/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('cmn', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model Agent {
  agentId?: string(name='AgentId'),
  agentName?: string(name='AgentName'),
  agentVersion?: string(name='AgentVersion'),
  cpuUsage?: string(name='CpuUsage'),
  diskUsage?: string(name='DiskUsage'),
  gmtModify?: string(name='GmtModify'),
  ip?: string(name='Ip'),
  kernelVersion?: string(name='KernelVersion'),
  memoryUsage?: string(name='MemoryUsage'),
  securityDomain?: string(name='SecurityDomain'),
  status?: string(name='Status'),
}

model AgentsTask {
  actionType?: string(name='ActionType'),
  agentType?: string(name='AgentType'),
  agentsTaskId?: string(name='AgentsTaskId'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModify?: string(name='GmtModify'),
  params?: string(name='Params'),
  status?: string(name='Status'),
}

model AggregateData {
  aggregateDataDescription?: string(name='AggregateDataDescription'),
  aggregateDataId?: string(name='AggregateDataId'),
  aggregateDataName?: string(name='AggregateDataName'),
  aggregateModeList?: [ string ](name='AggregateModeList'),
  dataItem?: string(name='DataItem'),
  deviceIdList?: [ string ](name='DeviceIdList'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModified?: string(name='GmtModified'),
  isAllDevice?: int32(name='IsAllDevice'),
  monitorItemId?: string(name='MonitorItemId'),
}

model AlarmOverview {
  alarmOverviewId?: string(name='AlarmOverviewId', example='ao-cd9qef1w3dfv'),
  alarmOverviewName?: string(name='AlarmOverviewName', example='Example Name'),
  conditionList?: [ 
    {
      conditionName?: string(name='ConditionName', example='AlarmStatus'),
      conditionValue?: string(name='ConditionValue', example='WARNING'),
    }
  ](name='ConditionList'),
  serialNumber?: int32(name='SerialNumber', example='0'),
}

model AtomicStep {
  description?: string(name='Description'),
  input?: [ 
    {
      description?: string(name='Description'),
      name?: string(name='Name'),
      sample?: string(name='Sample'),
      type?: string(name='Type'),
    }
  ](name='Input'),
  output?: [ 
    {
      description?: string(name='Description'),
      name?: string(name='Name'),
      sample?: string(name='Sample'),
      type?: string(name='Type'),
    }
  ](name='Output'),
  stepId?: string(name='StepId'),
  stepName?: string(name='StepName'),
  stepType?: string(name='StepType'),
}

model BusinessType {
  abbr?: string(name='Abbr', example='abbr'),
  actionFlag?: string(name='ActionFlag', example='DHCP'),
  businessTypeId?: string(name='BusinessTypeId'),
  createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
  direction?: long(name='Direction', example='0'),
  gateway?: long(name='Gateway', example='0'),
  leaseTime?: string(name='LeaseTime', example='1440'),
  mask?: string(name='Mask', example='24'),
  name?: string(name='Name', example='互联地址'),
  reserveNumber?: long(name='ReserveNumber', example='0'),
  sharing?: string(name='Sharing', example='reuse/single'),
  type?: string(name='Type', example='other'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
  vlan?: string(name='Vlan', example='100'),
  zoneType?: string(name='ZoneType', example='办公区'),
}

model CliTask {
  agentIp?: string(name='AgentIp'),
  cliTaskId?: string(name='CliTaskId'),
  command?: string(name='Command'),
  deviceId?: string(name='DeviceId'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModify?: string(name='GmtModify'),
  output?: string(name='Output'),
  protocol?: string(name='Protocol'),
  responseCode?: string(name='ResponseCode'),
  result?: string(name='Result'),
  sessionId?: string(name='SessionId'),
  status?: string(name='Status'),
  timeout?: int32(name='Timeout'),
}

model ConfigurationSpecification {
  architecture?: string(name='Architecture', example='5.0'),
  configurationSpecificationId?: string(name='ConfigurationSpecificationId', example='xxxyyy'),
  createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
  model?: string(name='Model', example='3601'),
  relatedVariate?: [ string ](name='RelatedVariate'),
  role?: string(name='Role', example='DSW'),
  specificationContent?: string(name='SpecificationContent', example='{{hostname}}'),
  specificationName?: string(name='SpecificationName', example='ConfigurationSpecificationName'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
  vendor?: string(name='Vendor', example='Alibaba'),
}

model ConfigurationVariate {
  comment?: string(name='Comment', example='项目变量'),
  configurationVariateId?: string(name='ConfigurationVariateId'),
  createTime?: string(name='CreateTime'),
  formatFunction?: string(name='FormatFunction', example='def main():'),
  updateTime?: string(name='UpdateTime'),
  variateName?: string(name='VariateName', example='project'),
}

model ConnectionPolicy {
  algorithm?: string(name='Algorithm', example='笛卡尔互联'),
  connectionPolicyId?: string(name='ConnectionPolicyId'),
  createTime?: string(name='CreateTime'),
  downlinkDeviceId?: string(name='DownlinkDeviceId', example='1e0rlfc3358e8h8f'),
  downlinkModuleId?: string(name='DownlinkModuleId', example='1e0rlfc3358e8h8f'),
  id?: string(name='Id', example='1e0rlfc3358e8h8f'),
  linkCount?: long(name='LinkCount', example='2'),
  name?: string(name='Name', example='pswtoasw'),
  networkArchitectureIterationId?: string(name='NetworkArchitectureIterationId', example='1e0rlfc3358e8h8f'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
  uplinkDeviceId?: string(name='UplinkDeviceId', example='1e0rlfc3358e8h8f'),
  uplinkModelId?: string(name='UplinkModelId', example='1e0rlfc3358e8h8f'),
}

model DataView {
  dataViewChartList?: [
    DataViewChart
  ](name='DataViewChartList'),
  dataViewDescription?: string(name='DataViewDescription'),
  dataViewId?: string(name='DataViewId'),
  dataViewName?: string(name='DataViewName'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModified?: string(name='GmtModified'),
}

model DataViewChart {
  chartType?: string(name='ChartType'),
  dataViewId?: string(name='DataViewId'),
  dataViewSource?: string(name='DataViewSource'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModified?: string(name='GmtModified'),
  grid?: string(name='Grid'),
}

model DedicatedLine {
  bandwidth?: int32(name='Bandwidth'),
  deviceId?: string(name='DeviceId'),
  devicePort?: string(name='DevicePort'),
  isp?: string(name='Isp'),
  lineGateway?: string(name='LineGateway'),
  lineId?: string(name='LineId'),
  lineIp?: string(name='LineIp'),
  lineRole?: string(name='LineRole'),
}

model Device {
  accountType?: string(name='AccountType'),
  accountVersion?: string(name='AccountVersion'),
  authPassPhrase?: string(name='AuthPassPhrase'),
  authProtocol?: string(name='AuthProtocol'),
  community?: string(name='Community'),
  deviceForm?: string(name='DeviceForm'),
  deviceId?: string(name='DeviceId'),
  deviceIp?: string(name='DeviceIp'),
  deviceMac?: string(name='DeviceMac'),
  deviceSn?: string(name='DeviceSn'),
  hostname?: string(name='Hostname'),
  model?: string(name='Model'),
  privacyPassPhrase?: string(name='PrivacyPassPhrase'),
  privacyProtocol?: string(name='PrivacyProtocol'),
  securityDomain?: string(name='SecurityDomain'),
  securityLevel?: string(name='SecurityLevel'),
  space?: string(name='Space'),
  sshAccount?: string(name='SshAccount'),
  sshPassword?: string(name='SshPassword'),
  status?: string(name='Status'),
  telnetAccount?: string(name='TelnetAccount'),
  telnetPassword?: string(name='TelnetPassword'),
  userName?: string(name='UserName'),
  vendor?: string(name='Vendor'),
}

model DeviceForm {
  accountConfig?: string(name='AccountConfig'),
  configCompare?: string(name='ConfigCompare'),
  formId?: string(name='FormId'),
  formName?: string(name='FormName'),
  propertiesList?: [
    DeviceFormProperty
  ](name='PropertiesList'),
}

model DeviceFormProperty {
  content?: string(name='Content'),
  keyword?: string(name='Keyword'),
  placeholder?: boolean(name='Placeholder'),
  required?: boolean(name='Required'),
  searchSupported?: boolean(name='SearchSupported'),
  sequence?: int32(name='Sequence'),
  tableVisible?: boolean(name='TableVisible'),
  uniqueness?: boolean(name='Uniqueness'),
  valueReference?: string(name='ValueReference'),
  valueSource?: string(name='ValueSource'),
  valueType?: string(name='ValueType'),
}

model DeviceProperty {
  content?: string(name='Content'),
  deviceForm?: string(name='DeviceForm'),
  format?: string(name='Format'),
  nameCn?: string(name='NameCn'),
  nameEn?: string(name='NameEn'),
  propertyId?: string(name='PropertyId'),
}

model DeviceResource {
  archId?: string(name='ArchId', example='archIdxxxyyy'),
  businessType?: string(name='BusinessType', example='LOOPBACK、BUSINESS、  INTERCONNECTION'),
  businessTypeId?: string(name='BusinessTypeId', example='businessTypeId'),
  businessTypeParams?: string(name='BusinessTypeParams', example='{}'),
  createTime?: string(name='CreateTime', example='2020-02-01'),
  data?: string(name='Data', example='zzz'),
  deviceResource?: [ 
    {
      blockNumber?: string(name='BlockNumber'),
      business?: string(name='Business'),
      config?: string(name='Config'),
      configGenerate?: boolean(name='ConfigGenerate'),
      configTaskStatus?: string(name='ConfigTaskStatus'),
      deliveryIp?: string(name='DeliveryIp'),
      deviceNumber?: string(name='DeviceNumber'),
      deviceResourceId?: string(name='DeviceResourceId'),
      hostName?: string(name='HostName'),
      interConnection?: string(name='InterConnection'),
      location?: string(name='Location'),
      loopback?: string(name='Loopback'),
      managerIp?: string(name='ManagerIp'),
      model?: string(name='Model'),
      role?: string(name='Role'),
      setupProjectId?: string(name='SetupProjectId'),
      sn?: string(name='Sn'),
      stack?: boolean(name='Stack'),
      vendor?: string(name='Vendor'),
    }
  ](name='DeviceResource'),
  deviceResourceId?: string(name='DeviceResourceId', example='deviceResourceId315'),
  deviceResourceIds?: [ string ](name='DeviceResourceIds'),
  downloadType?: string(name='DownloadType', example='CONNECTION'),
  ipType?: string(name='IpType', example='Loopback'),
  listType?: string(name='ListType', example='NORMAL、APPLY、RELEASE'),
  loopbackPort?: string(name='LoopbackPort', example='1'),
  netLocation?: string(name='NetLocation', example='[]'),
  setupProjectId?: string(name='SetupProjectId', example='xxx_zzz'),
  type?: string(name='Type', example='LOCATION、HOSTNAME、IP_ADDRESS、  CONFIGURATION_GENERATOR'),
}

model DeviceTask {
  deviceId?: string(name='DeviceId'),
  deviceIp?: string(name='DeviceIp'),
  deviceName?: string(name='DeviceName'),
  deviceTaskId?: string(name='DeviceTaskId'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModify?: string(name='GmtModify'),
  output?: string(name='Output'),
  params?: string(name='Params'),
  responseCode?: string(name='ResponseCode'),
  result?: string(name='Result'),
  scriptId?: string(name='ScriptId'),
  scriptVersion?: string(name='ScriptVersion'),
  status?: string(name='Status'),
  templateId?: string(name='TemplateId'),
  templateName?: string(name='TemplateName'),
}

model Event {
  alarmStatus?: string(name='AlarmStatus', example='WARNING'),
  count?: long(name='Count', example='10'),
  createTime?: string(name='CreateTime', example='2021-10-01 01:00:00'),
  deviceId?: string(name='DeviceId', example='device-dcfv2fob0g'),
  eventName?: string(name='EventName', example='探针掉线事件'),
  eventObject?: string(name='EventObject', example='xxx设备'),
  eventObjectId?: string(name='EventObjectId', example='device-12345'),
  eventType?: string(name='EventType', example='AGENT_EVENT'),
  message?: string(name='Message', example='xxx事件发生，请关注'),
  resourceDevice?: {
    hostName?: string(name='HostName', example='ASW-1'),
    physicalSpace?: string(name='PhysicalSpace', example='杭州X空间'),
  }(name='ResourceDevice'),
  templateId?: string(name='TemplateId', example='temp-1dcvf2911wdc'),
  updateTime?: string(name='UpdateTime', example='2021-10-01 01:00:00'),
}

model EventDefinition {
  createTime?: string(name='CreateTime', example='2021-10-01 00:00:00'),
  eventId?: string(name='EventId', example='e-12dc0qfv13df0'),
  eventName?: string(name='EventName', example='探针掉线事件'),
  eventType?: string(name='EventType', example='AGENT_TYPE'),
  templateId?: string(name='TemplateId', example='temp-12dc0qfv13df0'),
  updateTime?: string(name='UpdateTime', example='2021-10-01 00:00:00'),
}

model InspectionItem {
  inspectionCrontab?: string(name='InspectionCrontab'),
  itemDescription?: string(name='ItemDescription'),
  itemId?: string(name='ItemId'),
  itemName?: string(name='ItemName'),
}

model InspectionScript {
  inspectionAlarmRules?: [ 
    {
      alarmExpression?: string(name='AlarmExpression'),
      alarmLevel?: string(name='AlarmLevel'),
      alarmOperator?: string(name='AlarmOperator'),
      alarmValue?: string(name='AlarmValue'),
    }
  ](name='InspectionAlarmRules'),
  inspectionCrontab?: string(name='InspectionCrontab'),
  itemDescription?: string(name='ItemDescription'),
  itemId?: string(name='ItemId'),
  itemName?: string(name='ItemName'),
  model?: string(name='Model'),
  role?: string(name='Role'),
  script?: string(name='Script'),
  scriptId?: string(name='ScriptId'),
  scriptStatus?: string(name='ScriptStatus'),
  vendor?: string(name='Vendor'),
}

model InspectionTask {
  deviceId?: string(name='DeviceId'),
  errorCode?: string(name='ErrorCode'),
  executionBeginTime?: string(name='ExecutionBeginTime'),
  executionEndTime?: string(name='ExecutionEndTime'),
  hostname?: string(name='Hostname'),
  IP?: string(name='IP'),
  inspectionAlarmRules?: [ 
    {
      actualValue?: string(name='ActualValue'),
      expression?: string(name='Expression'),
      level?: string(name='Level'),
      operator?: string(name='Operator'),
      value?: string(name='Value'),
    }
  ](name='InspectionAlarmRules'),
  inspectionResult?: string(name='InspectionResult'),
  itemId?: string(name='ItemId'),
  itemName?: string(name='ItemName'),
  model?: string(name='Model'),
  role?: string(name='Role'),
  space?: string(name='Space'),
  taskStatus?: string(name='TaskStatus'),
  templateId?: string(name='TemplateId'),
  vendor?: string(name='Vendor'),
}

model Ip {
  businessTypeId?: string(name='BusinessTypeId', example='123'),
  businessTypeName?: string(name='BusinessTypeName', example='互联地址'),
  createTime?: string(name='CreateTime'),
  deviceMac?: string(name='DeviceMac', example='10:11:10:10:10:10'),
  deviceName?: string(name='DeviceName', example='ASW-1'),
  ipAddress?: string(name='IpAddress', example='10.0.0.1'),
  ipId?: string(name='IpId'),
  ipName?: string(name='IpName'),
  parentIpBlock?: string(name='ParentIpBlock', example='10.0.0.0/8'),
  port?: string(name='Port', example='vlan100'),
  status?: string(name='Status', example='using'),
  zoneLayer?: [ 
    {
      name?: string(name='Name', example='小型园区'),
      value?: string(name='Value', example='西安-百城'),
    }
  ](name='ZoneLayer'),
}

model IpBlock {
  application?: string(name='Application', example='员工出口IP'),
  backupDeviceName?: string(name='BackupDeviceName', example='ASW-2'),
  block?: string(name='Block', example='10.0.0.0'),
  businessTypeId?: string(name='BusinessTypeId', example='asdaasd'),
  category?: string(name='Category', example='IPV4'),
  createTime?: string(name='CreateTime'),
  description?: string(name='Description'),
  deviceName?: string(name='DeviceName', example='ASW-1'),
  ipBlockId?: string(name='IpBlockId'),
  mask?: string(name='Mask', example='8'),
  netBusiness?: string(name='NetBusiness', example='INC'),
  netType?: string(name='NetType', example='24'),
  ownership?: string(name='Ownership', example='阿里'),
  parentId?: string(name='ParentId', example='父地址段'),
  reserveParentBlock?: string(name='ReserveParentBlock', example='true'),
  resourceGroupId?: string(name='ResourceGroupId'),
  updateType?: string(name='UpdateType', example='update'),
  zoneLayer?: [ 
    {
      name?: string(name='Name', example='小型园区'),
      value?: string(name='Value', example='西安-百城'),
    }
  ](name='ZoneLayer'),
  zoneName?: string(name='ZoneName', example='西溪园区'),
}

model IpBlockRecord {
  createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
  creator?: long(name='Creator', example='张三'),
  description?: string(name='Description', example='""'),
  detail?: [ 
    {
      businessTypeName?: string(name='BusinessTypeName', example='互联地址'),
      deviceName?: string(name='DeviceName', example='ASW-1'),
      gateway?: string(name='Gateway', example='10.0.0.1'),
      parentIpBlocks?: [ string ](name='ParentIpBlocks'),
      zoneLayer?: [ 
        {
          name?: string(name='Name', example='小型园区'),
          value?: string(name='Value', example='西安-百城'),
        }
      ](name='ZoneLayer'),
    }
  ](name='Detail'),
  ipBlockCode?: [ string ](name='IpBlockCode'),
  ipBlockRecordId?: string(name='IpBlockRecordId', example='adaieaoweif_s3834'),
  netType?: string(name='NetType', example='PRIVATE'),
  recordType?: string(name='RecordType', example='Apply'),
  status?: string(name='Status', example='running'),
  title?: string(name='Title', example='申请xx地址'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
  workNo?: string(name='WorkNo', example='123'),
  zoneName?: string(name='ZoneName', example='西安-百城'),
}

model IpRecord {
  businessTypeName?: string(name='BusinessTypeName', example='互联地址'),
  createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
  creator?: string(name='Creator', example='张三'),
  description?: string(name='Description', example='备注'),
  detail?: [ 
    {
      deviceMac?: string(name='DeviceMac', example='10:10:10:10:10:10'),
      deviceName?: string(name='DeviceName', example='ASW-1'),
      gateway?: string(name='Gateway', example='10.0.0.1'),
      ip?: string(name='Ip', example='10.0.0.1'),
      parentIpBlocks?: [ string ](name='ParentIpBlocks'),
      port?: string(name='Port', example='TE-1'),
      remoteDeviceName?: string(name='RemoteDeviceName', example='PSW-1'),
      remoteIp?: string(name='RemoteIp', example='10.0.0.2'),
      remotePort?: string(name='RemotePort', example='TE-1'),
      zoneLayer?: [ 
        {
          name?: string(name='Name', example='小型园区'),
          value?: string(name='Value', example='西安百城'),
        }
      ](name='ZoneLayer'),
    }
  ](name='Detail'),
  ipBlock?: string(name='IpBlock', example='10.0.0.0/8'),
  ipCode?: [ string ](name='IpCode'),
  ipRecordId?: string(name='IpRecordId', example='adaieaoweif_s3834'),
  recodeType?: string(name='RecodeType', example='Apply'),
  status?: string(name='Status', example='running'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
  zoneName?: string(name='ZoneName', example='西安百城'),
}

model ModelToRole {
  createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
  id?: string(name='Id', example='1e0rlfc3358e8h8f'),
  model?: string(name='Model', example='CE6001'),
  modelToRoleId?: string(name='ModelToRoleId'),
  networkArchitectureIterationId?: string(name='NetworkArchitectureIterationId', example='1e0rlfc3358e8h8f'),
  role?: string(name='Role', example='ASW'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
  vendor?: string(name='Vendor', example='huawei'),
}

model Module {
  createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
  device?: {
    count?: long(name='Count', example='2'),
    createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
    deviceCount?: long(name='DeviceCount', example='2'),
    deviceRole?: string(name='DeviceRole', example='ASW'),
    deviceX?: string(name='DeviceX', example='2.222'),
    deviceY?: string(name='DeviceY', example='1.222'),
    id?: string(name='Id', example='xxxxxx'),
    role?: string(name='Role', example='ASW'),
    updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
    x?: string(name='X', example='2.222'),
    y?: string(name='Y', example='1.222'),
  }(name='Device'),
  id?: string(name='Id', example='1e0rlfc3358e8h8f'),
  maxCount?: long(name='MaxCount', example='10'),
  minCount?: long(name='MinCount', example='1'),
  moduleDetails?: [ 
    {
      deviceDetails?: [ 
        {
          orderNumber?: long(name='OrderNumber', example='2'),
        }
      ](name='DeviceDetails'),
      orderNumber?: long(name='OrderNumber', example='2'),
    }
  ](name='ModuleDetails'),
  moduleId?: string(name='ModuleId'),
  moduleType?: string(name='ModuleType', example='根模块/单角色模块/组合模块'),
  name?: string(name='Name', example='asw-2*25G'),
  parentModuleId?: string(name='ParentModuleId', example='1e0rlfc3358e8h8f'),
  stack?: boolean(name='Stack', example='true'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
}

model MonitorItem {
  analysisCode?: string(name='AnalysisCode'),
  collectionType?: string(name='CollectionType'),
  config?: string(name='Config'),
  enable?: int32(name='Enable'),
  execInterval?: string(name='ExecInterval'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModified?: string(name='GmtModified'),
  monitorItemDescription?: string(name='MonitorItemDescription'),
  monitorItemId?: string(name='MonitorItemId'),
  monitorItemName?: string(name='MonitorItemName'),
  securityDomain?: string(name='SecurityDomain'),
}

model NetworkArchitecture {
  archVersionIterationId?: string(name='ArchVersionIterationId', example='1e0rlfc3358e8h8f'),
  availabe?: boolean(name='Availabe', example='true'),
  children?: [ string ](name='Children'),
  createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
  description?: string(name='Description', example='5.0架构'),
  deviceNumber?: long(name='DeviceNumber', example='1'),
  groupNumber?: long(name='GroupNumber', example='1'),
  id?: string(name='Id', example='1e0rlfc3358e8h8f'),
  name?: string(name='Name', example='5.0'),
  networkArchitectureId?: string(name='NetworkArchitectureId'),
  role?: string(name='Role', example='ASW'),
  selected?: boolean(name='Selected', example='true'),
  stack?: boolean(name='Stack', example='true'),
  status?: string(name='Status', example='USED、UNUSED、DEFINNIG'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
  version?: string(name='Version', example='V1'),
}

model NotificationGroup {
  gmtCreate?: string(name='GmtCreate'),
  gmtModified?: string(name='GmtModified'),
  notificationGroupDescription?: string(name='NotificationGroupDescription'),
  notificationGroupId?: string(name='NotificationGroupId'),
  notificationGroupName?: string(name='NotificationGroupName'),
  notificationGroupType?: string(name='NotificationGroupType'),
  webhook?: string(name='Webhook'),
}

model Order {
  gmtCreate?: string(name='GmtCreate'),
  gmtModify?: string(name='GmtModify'),
  orderId?: string(name='OrderId'),
  output?: string(name='Output'),
  params?: string(name='Params'),
  schemeId?: string(name='SchemeId'),
  schemeName?: string(name='SchemeName'),
  status?: string(name='Status'),
  title?: string(name='Title'),
}

model OrderStep {
  displayMethod?: string(name='DisplayMethod'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModify?: string(name='GmtModify'),
  jobKwargs?: string(name='JobKwargs'),
  jobMessage?: string(name='JobMessage'),
  jobReturnStatus?: string(name='JobReturnStatus'),
  jobReturnValues?: string(name='JobReturnValues'),
  jobSystem?: string(name='JobSystem'),
  orderId?: string(name='OrderId'),
  orderStepId?: string(name='OrderStepId'),
  realNextStep?: string(name='RealNextStep'),
  restriction?: [ 
    {
      label?: string(name='Label'),
      value?: string(name='Value'),
    }
  ](name='Restriction'),
  stepName?: string(name='StepName'),
  stepStatus?: string(name='StepStatus'),
  stepTitle?: string(name='StepTitle'),
  stepType?: string(name='StepType'),
}

model OsVersion {
  accessId?: string(name='AccessId', example='accessId'),
  createTime?: string(name='CreateTime', example='2020-02-01'),
  directory?: string(name='Directory', example='/sdkajd'),
  expireTime?: string(name='ExpireTime', example='2020-02-01'),
  fileName?: string(name='FileName', example='file'),
  filePath?: string(name='FilePath', example='/filePath'),
  host?: string(name='Host', example='daldk'),
  model?: string(name='Model', example='5750'),
  osVersion?: string(name='OsVersion', example='1.0'),
  osVersionId?: string(name='OsVersionId', example='osVersionId'),
  policy?: string(name='Policy', example='sjfoae'),
  signature?: string(name='Signature', example='dkfja'),
  status?: string(name='Status', example='USED'),
  vendor?: string(name='Vendor', example='HUAWEI'),
}

model PhysicalSpace {
  address?: string(name='Address'),
  city?: string(name='City'),
  country?: string(name='Country'),
  province?: string(name='Province'),
  spaceId?: string(name='SpaceId'),
  spaceName?: string(name='SpaceName'),
}

model PhysicalSpaceDto {
  address?: string(name='Address'),
  children?: [
    PhysicalSpaceDto
  ](name='Children'),
  city?: string(name='City'),
  country?: string(name='Country'),
  fullParentPath?: string(name='FullParentPath'),
  instance?: string(name='Instance'),
  owner?: string(name='Owner'),
  parentUid?: string(name='ParentUid'),
  physicalSpaceId?: string(name='PhysicalSpaceId'),
  physicalSpaceName?: string(name='PhysicalSpaceName'),
  province?: string(name='Province'),
  remark?: string(name='Remark'),
  securityDomainList?: [ string ](name='SecurityDomainList'),
  spaceAbbreviation?: string(name='SpaceAbbreviation'),
  spaceType?: string(name='SpaceType'),
}

model Port {
  deviceId?: string(name='DeviceId'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModified?: string(name='GmtModified'),
  portCollectionId?: string(name='PortCollectionId'),
  portName?: string(name='PortName'),
}

model PortCollection {
  gmtCreate?: string(name='GmtCreate'),
  gmtModified?: string(name='GmtModified'),
  portCollectionDescription?: string(name='PortCollectionDescription'),
  portCollectionId?: string(name='PortCollectionId'),
  portCollectionName?: string(name='PortCollectionName'),
  portList?: [
    Port
  ](name='PortList'),
}

model ResourceInformation {
  architectureId?: string(name='ArchitectureId', example='architectureId'),
  createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
  information?: [ 
    {
      key?: string(name='Key', example='ip'),
      keyAction?: string(name='KeyAction', example='/xxx/zzz'),
      keyAttribute?: string(name='KeyAttribute', example='IP地址'),
      keyDescription?: string(name='KeyDescription', example='IP地址'),
    }
  ](name='Information'),
  resourceAttribute?: string(name='ResourceAttribute', example='6510'),
  resourceInformationId?: string(name='ResourceInformationId'),
  resourceType?: string(name='ResourceType', example='CMDB'),
  setupProjectId?: string(name='SetupProjectId', example='adaieaoweif_s3834'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
}

model ScheduleDuty {
  createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
  endDate?: string(name='EndDate', example='2020-12-22'),
  scheduleDutyId?: string(name='ScheduleDutyId'),
  scheduleTypeIds?: [ string ](name='ScheduleTypeIds'),
  startDate?: string(name='StartDate', example='2020-12-22'),
  typeWorkerList?: [ 
    {
      scheduleTypeId?: string(name='ScheduleTypeId', example='scheduleTypeIdcccc'),
      scheduleWorkerName?: [ string ](name='ScheduleWorkerName'),
    }
  ](name='TypeWorkerList'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
  workDate?: string(name='WorkDate', example='2020-12-22'),
  workType?: string(name='WorkType', example='夜班'),
  workerId?: string(name='WorkerId', example='123456'),
  workerName?: string(name='WorkerName', example='张三'),
}

model ScheduleType {
  createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
  key?: string(name='Key', example='1234567'),
  relatedWorker?: [ string ](name='RelatedWorker'),
  scheduleTypeId?: string(name='ScheduleTypeId', example='scheduleTypeIdxxx'),
  status?: string(name='Status', example='xxx'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
  value?: string(name='Value', example='张三'),
}

model ScheduleWorker {
  createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
  scheduleWorkerId?: string(name='ScheduleWorkerId', example='scheduleWorkerId'),
  updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
  workerContact?: string(name='WorkerContact', example='135'),
  workerId?: string(name='WorkerId', example='1234567'),
  workerName?: string(name='WorkerName', example='张三'),
}

model Scheme {
  category?: string(name='Category'),
  content?: string(name='Content'),
  description?: string(name='Description'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModify?: string(name='GmtModify'),
  input?: [ 
    {
      description?: string(name='Description'),
      name?: string(name='Name'),
      sample?: string(name='Sample'),
      type?: string(name='Type'),
    }
  ](name='Input'),
  output?: [ 
    {
      description?: string(name='Description'),
      name?: string(name='Name'),
      sample?: string(name='Sample'),
      type?: string(name='Type'),
    }
  ](name='Output'),
  schemeId?: string(name='SchemeId'),
  schemeName?: string(name='SchemeName'),
  status?: string(name='Status'),
  view?: string(name='View'),
}

model Script {
  content?: string(name='Content'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModify?: string(name='GmtModify'),
  input?: [ 
    {
      description?: string(name='Description'),
      name?: string(name='Name'),
      sample?: string(name='Sample'),
      type?: string(name='Type'),
    }
  ](name='Input'),
  output?: [ 
    {
      description?: string(name='Description'),
      name?: string(name='Name'),
      sample?: string(name='Sample'),
      type?: string(name='Type'),
    }
  ](name='Output'),
  rules?: [
    ScriptRule
  ](name='Rules'),
  scriptId?: string(name='ScriptId'),
  templateId?: string(name='TemplateId'),
  versionId?: string(name='VersionId'),
}

model ScriptHistory {
  comment?: string(name='Comment'),
  content?: string(name='Content'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModify?: string(name='GmtModify'),
  input?: [ 
    {
      description?: string(name='Description'),
      name?: string(name='Name'),
      sample?: string(name='Sample'),
      type?: string(name='Type'),
    }
  ](name='Input'),
  output?: [ 
    {
      description?: string(name='Description'),
      name?: string(name='Name'),
      sample?: string(name='Sample'),
      type?: string(name='Type'),
    }
  ](name='Output'),
  scriptId?: string(name='ScriptId'),
  versionId?: string(name='VersionId'),
}

model ScriptRule {
  arch?: string(name='Arch'),
  domain?: string(name='Domain'),
  model?: string(name='Model'),
  os?: string(name='Os'),
  role?: string(name='Role'),
  ruleId?: string(name='RuleId'),
  scriptId?: string(name='ScriptId'),
  vendor?: string(name='Vendor'),
}

model SetupProject {
  archId?: string(name='ArchId', example='xxxyyy'),
  archVersion?: string(name='ArchVersion', example='5.0'),
  architectureId?: string(name='ArchitectureId', example='archId'),
  createTime?: string(name='CreateTime', example='2020-02-01'),
  deliveryTime?: string(name='DeliveryTime', example='2021-03-27 00:00:00'),
  description?: string(name='Description', example='建设交付项目'),
  nodes?: string(name='Nodes', example='[]'),
  packages?: [ 
    {
      deviceNumber?: string(name='DeviceNumber', example='1'),
      model?: string(name='Model', example='6510'),
      role?: string(name='Role', example='DSW'),
      vendor?: string(name='Vendor', example='Ruijie'),
    }
  ](name='Packages'),
  setupProjectId?: string(name='SetupProjectId', example='xxxyyy'),
  setupProjectName?: string(name='SetupProjectName', example='Project'),
  spaceId?: string(name='SpaceId', example='xxxyyy'),
  spaceName?: string(name='SpaceName', example='大型园区'),
  spaceType?: string(name='SpaceType', example='园区'),
  status?: string(name='Status', example='USED'),
}

model SpaceModel {
  createTime?: string(name='CreateTime', example='2020-02-01'),
  instance?: string(name='Instance', example='{}'),
  operateType?: string(name='OperateType', example='CMDB'),
  sort?: {
    level?: long(name='Level', example='2'),
    levelName?: string(name='LevelName', example='核心机房'),
  }(name='Sort'),
  spaceId?: string(name='SpaceId', example='spaceIdxxxyyy'),
  spaceModel?: {
    createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
    sort?: {
      level?: long(name='Level', example='1'),
      levleName?: string(name='LevleName', example='园区'),
    }(name='Sort'),
    spaceModelId?: string(name='SpaceModelId', example='xxx_yyy'),
    spaceType?: string(name='SpaceType', example='园区'),
    status?: string(name='Status', example='LOCK'),
    updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
  }(name='SpaceModel'),
  spaceModelId?: string(name='SpaceModelId', example='spaceModelIdsdad'),
  spaceModelName?: string(name='SpaceModelName', example='2020-02-01'),
  spaceType?: string(name='SpaceType', example='园区'),
  status?: string(name='Status', example='USE'),
}

model SubscriptionItem {
  alarmStatus?: string(name='AlarmStatus'),
  language?: string(name='Language'),
  monitorItemId?: string(name='MonitorItemId'),
  notificationGroupId?: string(name='NotificationGroupId'),
  notificationMode?: string(name='NotificationMode'),
  recoveryNotice?: int32(name='RecoveryNotice'),
  subscriptionItemId?: string(name='SubscriptionItemId'),
  subscriptionType?: string(name='SubscriptionType'),
  suppressionStrategy?: string(name='SuppressionStrategy'),
  triggerTimes?: int32(name='TriggerTimes'),
}

model Task {
  category?: string(name='Category'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModify?: string(name='GmtModify'),
  params?: string(name='Params'),
  responseCode?: string(name='ResponseCode'),
  result?: string(name='Result'),
  status?: string(name='Status'),
  taskId?: string(name='TaskId'),
  templateId?: string(name='TemplateId'),
  templateName?: string(name='TemplateName'),
}

model TaskLog {
  funcName?: string(name='FuncName'),
  gmtCreate?: string(name='GmtCreate'),
  level?: string(name='Level'),
  lineNo?: int32(name='LineNo'),
  logId?: string(name='LogId'),
  message?: string(name='Message'),
  taskId?: string(name='TaskId'),
}

model Template {
  category?: string(name='Category'),
  comment?: string(name='Comment'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModify?: string(name='GmtModify'),
  input?: [ 
    {
      description?: string(name='Description'),
      name?: string(name='Name'),
      sample?: string(name='Sample'),
      type?: string(name='Type'),
    }
  ](name='Input'),
  output?: [ 
    {
      description?: string(name='Description'),
      name?: string(name='Name'),
      sample?: string(name='Sample'),
      type?: string(name='Type'),
    }
  ](name='Output'),
  templateName?: string(name='TemplateName'),
  templateType?: string(name='TemplateType'),
}

model TimePeriod {
  cronExpression?: string(name='CronExpression'),
  gmtCreate?: string(name='GmtCreate'),
  gmtModified?: string(name='GmtModified'),
  source?: string(name='Source'),
  timePeriodDescription?: string(name='TimePeriodDescription'),
  timePeriodId?: string(name='TimePeriodId'),
  timePeriodName?: string(name='TimePeriodName'),
}

model ZoneType {
  createTime?: string(name='CreateTime'),
  name?: string(name='Name', example='办公区'),
  zoneTypeId?: string(name='ZoneTypeId'),
  zoneTypeLayer?: [ 
    {
      mask?: long(name='Mask', example='24'),
      name?: string(name='Name', example='办公区'),
    }
  ](name='ZoneTypeLayer'),
  zoneTypeName?: string(name='ZoneTypeName'),
}

model ApplyIPRequest {
  businessTypeId?: string(name='BusinessTypeId', example='xxxyyy'),
  businessTypeParams?: string(name='BusinessTypeParams', example='{}'),
  deviceResourceId?: string(name='DeviceResourceId', example='deviceResourceId'),
  deviceResourceIds?: [ string ](name='DeviceResourceIds'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  ipType?: string(name='IpType', example='LOOPBACK_SEGMENT、INTERCONNECTION_SEGMENT  LOOPBACK、BUSINESS、  INTERCONNECTION'),
  loopbackPort?: string(name='LoopbackPort', example='0'),
  netLocation?: string(name='NetLocation', example='{}'),
  setupProjectId?: string(name='SetupProjectId', example='xxxyyy'),
}

model ApplyIPShrinkRequest {
  businessTypeId?: string(name='BusinessTypeId', example='xxxyyy'),
  businessTypeParams?: string(name='BusinessTypeParams', example='{}'),
  deviceResourceId?: string(name='DeviceResourceId', example='deviceResourceId'),
  deviceResourceIdsShrink?: string(name='DeviceResourceIds'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  ipType?: string(name='IpType', example='LOOPBACK_SEGMENT、INTERCONNECTION_SEGMENT  LOOPBACK、BUSINESS、  INTERCONNECTION'),
  loopbackPort?: string(name='LoopbackPort', example='0'),
  netLocation?: string(name='NetLocation', example='{}'),
  setupProjectId?: string(name='SetupProjectId', example='xxxyyy'),
}

model ApplyIPResponseBody = {
  requestId?: string(name='RequestId'),
}

model ApplyIPResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ApplyIPResponseBody(name='body'),
}

async function applyIPWithOptions(tmpReq: ApplyIPRequest, runtime: Util.RuntimeOptions): ApplyIPResponse {
  Util.validateModel(tmpReq);
  var request = new ApplyIPShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceResourceIds)) {
    request.deviceResourceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceResourceIds, 'DeviceResourceIds', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.businessTypeId)) {
    query['BusinessTypeId'] = request.businessTypeId;
  }
  if (!Util.isUnset(request.businessTypeParams)) {
    query['BusinessTypeParams'] = request.businessTypeParams;
  }
  if (!Util.isUnset(request.deviceResourceId)) {
    query['DeviceResourceId'] = request.deviceResourceId;
  }
  if (!Util.isUnset(request.deviceResourceIdsShrink)) {
    query['DeviceResourceIds'] = request.deviceResourceIdsShrink;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.ipType)) {
    query['IpType'] = request.ipType;
  }
  if (!Util.isUnset(request.loopbackPort)) {
    query['LoopbackPort'] = request.loopbackPort;
  }
  if (!Util.isUnset(request.netLocation)) {
    query['NetLocation'] = request.netLocation;
  }
  if (!Util.isUnset(request.setupProjectId)) {
    query['SetupProjectId'] = request.setupProjectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ApplyIP',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function applyIP(request: ApplyIPRequest): ApplyIPResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyIPWithOptions(request, runtime);
}

model AutoDutyRequest {
  dutyBatch?: string(name='DutyBatch'),
  dutyName?: string(name='DutyName'),
  endDate?: string(name='EndDate'),
  instanceId?: string(name='InstanceId'),
  startDate?: string(name='StartDate'),
}

model AutoDutyResponseBody = {
  requestId?: string(name='RequestId'),
}

model AutoDutyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AutoDutyResponseBody(name='body'),
}

async function autoDutyWithOptions(request: AutoDutyRequest, runtime: Util.RuntimeOptions): AutoDutyResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dutyBatch)) {
    body['DutyBatch'] = request.dutyBatch;
  }
  if (!Util.isUnset(request.dutyName)) {
    body['DutyName'] = request.dutyName;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AutoDuty',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function autoDuty(request: AutoDutyRequest): AutoDutyResponse {
  var runtime = new Util.RuntimeOptions{};
  return autoDutyWithOptions(request, runtime);
}

model CloseEventRequest {
  eventName?: string(name='EventName', example='探针掉线事件'),
  eventObjectId?: string(name='EventObjectId', example='agent'),
  eventType?: string(name='EventType', example='AGENT_EVENT'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
}

model CloseEventResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='86AD5F3A-5D42-5104-82B2-BB75255B29B5'),
}

model CloseEventResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CloseEventResponseBody(name='body'),
}

async function closeEventWithOptions(request: CloseEventRequest, runtime: Util.RuntimeOptions): CloseEventResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.eventName)) {
    body['EventName'] = request.eventName;
  }
  if (!Util.isUnset(request.eventObjectId)) {
    body['EventObjectId'] = request.eventObjectId;
  }
  if (!Util.isUnset(request.eventType)) {
    body['EventType'] = request.eventType;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CloseEvent',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function closeEvent(request: CloseEventRequest): CloseEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return closeEventWithOptions(request, runtime);
}

model CreateConfigurationSpecificationRequest {
  architecture?: string(name='Architecture', example='5.0'),
  clientToken?: string(name='ClientToken', example='clientToken'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  model?: string(name='Model', example='3601'),
  relatedVariate?: [ bytes ](name='RelatedVariate'),
  role?: string(name='Role', example='DSW'),
  specificationContent?: string(name='SpecificationContent', example='{{hostname}}'),
  specificationName?: string(name='SpecificationName', example='ConfigurationSpecificationName'),
  vendor?: string(name='Vendor', example='Alibaba'),
}

model CreateConfigurationSpecificationShrinkRequest {
  architecture?: string(name='Architecture', example='5.0'),
  clientToken?: string(name='ClientToken', example='clientToken'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  model?: string(name='Model', example='3601'),
  relatedVariateShrink?: string(name='RelatedVariate'),
  role?: string(name='Role', example='DSW'),
  specificationContent?: string(name='SpecificationContent', example='{{hostname}}'),
  specificationName?: string(name='SpecificationName', example='ConfigurationSpecificationName'),
  vendor?: string(name='Vendor', example='Alibaba'),
}

model CreateConfigurationSpecificationResponseBody = {
  configurationSpecificationId?: string(name='ConfigurationSpecificationId', example='adaieaoweif_s3834'),
  requestId?: string(name='RequestId', example='requestId'),
}

model CreateConfigurationSpecificationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateConfigurationSpecificationResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param tmpReq CreateConfigurationSpecificationRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return CreateConfigurationSpecificationResponse
 */
// Deprecated
async function createConfigurationSpecificationWithOptions(tmpReq: CreateConfigurationSpecificationRequest, runtime: Util.RuntimeOptions): CreateConfigurationSpecificationResponse {
  Util.validateModel(tmpReq);
  var request = new CreateConfigurationSpecificationShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.relatedVariate)) {
    request.relatedVariateShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.relatedVariate, 'RelatedVariate', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.architecture)) {
    body['Architecture'] = request.architecture;
  }
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.relatedVariateShrink)) {
    body['RelatedVariate'] = request.relatedVariateShrink;
  }
  if (!Util.isUnset(request.role)) {
    body['Role'] = request.role;
  }
  if (!Util.isUnset(request.specificationContent)) {
    body['SpecificationContent'] = request.specificationContent;
  }
  if (!Util.isUnset(request.specificationName)) {
    body['SpecificationName'] = request.specificationName;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateConfigurationSpecification',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request CreateConfigurationSpecificationRequest
  * @return CreateConfigurationSpecificationResponse
 */
// Deprecated
async function createConfigurationSpecification(request: CreateConfigurationSpecificationRequest): CreateConfigurationSpecificationResponse {
  var runtime = new Util.RuntimeOptions{};
  return createConfigurationSpecificationWithOptions(request, runtime);
}

model CreateConfigurationVariateRequest {
  clientToken?: string(name='ClientToken', example='clientToken'),
  comment?: string(name='Comment', example='项目变量'),
  formatFunction?: string(name='FormatFunction', example='def main():'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  variateName?: string(name='VariateName', description='代表资源名称的资源属性字段', example='variateName'),
}

model CreateConfigurationVariateResponseBody = {
  configurationVariateId?: string(name='ConfigurationVariateId', example='configurationVariateId'),
  requestId?: string(name='RequestId', example='requestId'),
}

model CreateConfigurationVariateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateConfigurationVariateResponseBody(name='body'),
}

async function createConfigurationVariateWithOptions(request: CreateConfigurationVariateRequest, runtime: Util.RuntimeOptions): CreateConfigurationVariateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.comment)) {
    body['Comment'] = request.comment;
  }
  if (!Util.isUnset(request.formatFunction)) {
    body['FormatFunction'] = request.formatFunction;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.variateName)) {
    body['VariateName'] = request.variateName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateConfigurationVariate',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createConfigurationVariate(request: CreateConfigurationVariateRequest): CreateConfigurationVariateResponse {
  var runtime = new Util.RuntimeOptions{};
  return createConfigurationVariateWithOptions(request, runtime);
}

model CreateDedicatedLineRequest {
  bandwidth?: int32(name='Bandwidth', example='100'),
  clientToken?: string(name='ClientToken', example='e33320bc-7b29-4d0b-abe1-f15804c1c567'),
  contact?: string(name='Contact', example='张三'),
  dedicatedLineGateway?: string(name='DedicatedLineGateway', example='111.111.xxx.xxx'),
  dedicatedLineIp?: string(name='DedicatedLineIp', example='111.111.xxx.xxx'),
  dedicatedLineRole?: string(name='DedicatedLineRole', example='主'),
  description?: string(name='Description', example='备注'),
  deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
  devicePort?: string(name='DevicePort', example='GigabitEthernet1/0/0'),
  expirationDate?: string(name='ExpirationDate', example='2022-06-14 04:00:00'),
  extAttributes?: string(name='ExtAttributes', example='{"Location":"cdc"}'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  isp?: string(name='Isp', example='电信'),
  ispFormId?: string(name='IspFormId', example='space_isp_form-garigikip9zrog'),
  ispId?: string(name='IspId', example='isp-dhyw2lxfpcs80d9'),
  keyword?: string(name='Keyword', example='测试专线'),
  onlineDate?: string(name='OnlineDate', example='2022-06-13 12:00:00'),
  phone?: string(name='Phone', example='133xxxxxxxx'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
}

model CreateDedicatedLineResponseBody = {
  dedicatedLineId?: string(name='DedicatedLineId', example='space_isp-6dk5xpoyoopr6obf'),
  requestId?: string(name='RequestId', example='8de935f6-90c7-444e-a2b4-bb4185153435'),
}

model CreateDedicatedLineResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateDedicatedLineResponseBody(name='body'),
}

async function createDedicatedLineWithOptions(request: CreateDedicatedLineRequest, runtime: Util.RuntimeOptions): CreateDedicatedLineResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bandwidth)) {
    body['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.contact)) {
    body['Contact'] = request.contact;
  }
  if (!Util.isUnset(request.dedicatedLineGateway)) {
    body['DedicatedLineGateway'] = request.dedicatedLineGateway;
  }
  if (!Util.isUnset(request.dedicatedLineIp)) {
    body['DedicatedLineIp'] = request.dedicatedLineIp;
  }
  if (!Util.isUnset(request.dedicatedLineRole)) {
    body['DedicatedLineRole'] = request.dedicatedLineRole;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.devicePort)) {
    body['DevicePort'] = request.devicePort;
  }
  if (!Util.isUnset(request.expirationDate)) {
    body['ExpirationDate'] = request.expirationDate;
  }
  if (!Util.isUnset(request.extAttributes)) {
    body['ExtAttributes'] = request.extAttributes;
  }
  if (!Util.isUnset(request.isp)) {
    body['Isp'] = request.isp;
  }
  if (!Util.isUnset(request.ispFormId)) {
    body['IspFormId'] = request.ispFormId;
  }
  if (!Util.isUnset(request.ispId)) {
    body['IspId'] = request.ispId;
  }
  if (!Util.isUnset(request.keyword)) {
    body['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.onlineDate)) {
    body['OnlineDate'] = request.onlineDate;
  }
  if (!Util.isUnset(request.phone)) {
    body['Phone'] = request.phone;
  }
  if (!Util.isUnset(request.physicalSpaceId)) {
    body['PhysicalSpaceId'] = request.physicalSpaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateDedicatedLine',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createDedicatedLine(request: CreateDedicatedLineRequest): CreateDedicatedLineResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDedicatedLineWithOptions(request, runtime);
}

model CreateDeviceRequest {
  clientToken?: string(name='ClientToken', example='9388616d-2d78-48c9-87b7-3d1083c91a79'),
  deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
  enablePassword?: string(name='EnablePassword', description='enable密码', example='pass****'),
  extAttributes?: string(name='ExtAttributes', description='设备额外属性(JSON)', example='{"role":"ASW"}'),
  hostName?: string(name='HostName', description='主机名', example='HZYT_USG6620_A'),
  instanceId?: string(name='InstanceId', description='实例ID', example='cmn-cn-xxx'),
  ip?: string(name='Ip', description='设备IP', example='10.17.101.1'),
  loginPassword?: string(name='LoginPassword', description='设备TELNET账号', example='123456'),
  loginType?: string(name='LoginType', description='设备SSH登录账号', example='SSH,TELNET'),
  loginUsername?: string(name='LoginUsername', description='设备SSH登录密码', example='admin'),
  mac?: string(name='Mac', description='设备MAC地址', example='b8:27:eb:34:3b:a2'),
  model?: string(name='Model', description='设备型号', example='USG6620'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
  securityDomain?: string(name='SecurityDomain', description='设备安全域', example='IT'),
  serviceStatus?: string(name='ServiceStatus', description='设备状态', example='online'),
  sn?: string(name='Sn', description='设备SN', example='210235951910K7000016'),
  snmpAccountType?: string(name='SnmpAccountType', description='账号类型', example='get'),
  snmpAccountVersion?: string(name='SnmpAccountVersion', description='SNMP版本号', example='v3'),
  snmpAuthPassphrase?: string(name='SnmpAuthPassphrase', description='SNMP Auth PassPhrase', example='123456'),
  snmpAuthProtocol?: string(name='SnmpAuthProtocol', description='SNMP Auth Protocol', example='MD5'),
  snmpCommunity?: string(name='SnmpCommunity', description='SNMP Community', example='123456'),
  snmpPrivacyPassphrase?: string(name='SnmpPrivacyPassphrase', description='SNMP Privacy Passphrase', example='145c44bb2f34610154e84dbe2a7ade04'),
  snmpPrivacyProtocol?: string(name='SnmpPrivacyProtocol', description='SNMP Privacy Protocol', example='DES'),
  snmpSecurityLevel?: string(name='SnmpSecurityLevel', description='安全级别', example='AUTH_PRIV'),
  snmpUsername?: string(name='SnmpUsername', description='用户名', example='admin'),
  vendor?: string(name='Vendor', description='设备厂商', example='Huawei'),
}

model CreateDeviceResponseBody = {
  deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
  requestId?: string(name='RequestId', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
}

model CreateDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateDeviceResponseBody(name='body'),
}

async function createDeviceWithOptions(request: CreateDeviceRequest, runtime: Util.RuntimeOptions): CreateDeviceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.deviceFormId)) {
    body['DeviceFormId'] = request.deviceFormId;
  }
  if (!Util.isUnset(request.enablePassword)) {
    body['EnablePassword'] = request.enablePassword;
  }
  if (!Util.isUnset(request.extAttributes)) {
    body['ExtAttributes'] = request.extAttributes;
  }
  if (!Util.isUnset(request.hostName)) {
    body['HostName'] = request.hostName;
  }
  if (!Util.isUnset(request.ip)) {
    body['Ip'] = request.ip;
  }
  if (!Util.isUnset(request.loginPassword)) {
    body['LoginPassword'] = request.loginPassword;
  }
  if (!Util.isUnset(request.loginType)) {
    body['LoginType'] = request.loginType;
  }
  if (!Util.isUnset(request.loginUsername)) {
    body['LoginUsername'] = request.loginUsername;
  }
  if (!Util.isUnset(request.mac)) {
    body['Mac'] = request.mac;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.physicalSpaceId)) {
    body['PhysicalSpaceId'] = request.physicalSpaceId;
  }
  if (!Util.isUnset(request.securityDomain)) {
    body['SecurityDomain'] = request.securityDomain;
  }
  if (!Util.isUnset(request.serviceStatus)) {
    body['ServiceStatus'] = request.serviceStatus;
  }
  if (!Util.isUnset(request.sn)) {
    body['Sn'] = request.sn;
  }
  if (!Util.isUnset(request.snmpAccountType)) {
    body['SnmpAccountType'] = request.snmpAccountType;
  }
  if (!Util.isUnset(request.snmpAccountVersion)) {
    body['SnmpAccountVersion'] = request.snmpAccountVersion;
  }
  if (!Util.isUnset(request.snmpAuthPassphrase)) {
    body['SnmpAuthPassphrase'] = request.snmpAuthPassphrase;
  }
  if (!Util.isUnset(request.snmpAuthProtocol)) {
    body['SnmpAuthProtocol'] = request.snmpAuthProtocol;
  }
  if (!Util.isUnset(request.snmpCommunity)) {
    body['SnmpCommunity'] = request.snmpCommunity;
  }
  if (!Util.isUnset(request.snmpPrivacyPassphrase)) {
    body['SnmpPrivacyPassphrase'] = request.snmpPrivacyPassphrase;
  }
  if (!Util.isUnset(request.snmpPrivacyProtocol)) {
    body['SnmpPrivacyProtocol'] = request.snmpPrivacyProtocol;
  }
  if (!Util.isUnset(request.snmpSecurityLevel)) {
    body['SnmpSecurityLevel'] = request.snmpSecurityLevel;
  }
  if (!Util.isUnset(request.snmpUsername)) {
    body['SnmpUsername'] = request.snmpUsername;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateDevice',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createDevice(request: CreateDeviceRequest): CreateDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDeviceWithOptions(request, runtime);
}

model CreateDeviceFormRequest {
  accountConfig?: boolean(name='AccountConfig', description='是否需要账号配置', example='true'),
  clientToken?: string(name='ClientToken', example='c6aaac41-8cfa-4952-bb1c-1ad9617ab23f'),
  configCompare?: boolean(name='ConfigCompare', description='是否支持配置生成', example='true'),
  detailDisplay?: boolean(name='DetailDisplay', example='true'),
  deviceFormName?: string(name='DeviceFormName', description='设备形态名称', example='网络设备'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  relatedDeviceFormId?: string(name='RelatedDeviceFormId', example='form-u4ilnhu64h026lrf'),
  resourceUse?: string(name='ResourceUse', example='ASSET'),
  script?: string(name='Script', example='def func(dev):\\n    \\n    return datetime.datetime.strptime(datetime.datetime.now(), \\"%Y\\")'),
  uniqueKey?: string(name='UniqueKey', example='SN'),
}

model CreateDeviceFormResponseBody = {
  deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
  requestId?: string(name='RequestId', example='6d439436-ddde-4f26-aaf6-0470099b5c35'),
}

model CreateDeviceFormResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateDeviceFormResponseBody(name='body'),
}

async function createDeviceFormWithOptions(request: CreateDeviceFormRequest, runtime: Util.RuntimeOptions): CreateDeviceFormResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.accountConfig)) {
    body['AccountConfig'] = request.accountConfig;
  }
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.configCompare)) {
    body['ConfigCompare'] = request.configCompare;
  }
  if (!Util.isUnset(request.detailDisplay)) {
    body['DetailDisplay'] = request.detailDisplay;
  }
  if (!Util.isUnset(request.deviceFormName)) {
    body['DeviceFormName'] = request.deviceFormName;
  }
  if (!Util.isUnset(request.relatedDeviceFormId)) {
    body['RelatedDeviceFormId'] = request.relatedDeviceFormId;
  }
  if (!Util.isUnset(request.resourceUse)) {
    body['ResourceUse'] = request.resourceUse;
  }
  if (!Util.isUnset(request.script)) {
    body['Script'] = request.script;
  }
  if (!Util.isUnset(request.uniqueKey)) {
    body['UniqueKey'] = request.uniqueKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateDeviceForm',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createDeviceForm(request: CreateDeviceFormRequest): CreateDeviceFormResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDeviceFormWithOptions(request, runtime);
}

model CreateDevicePropertyRequest {
  clientToken?: string(name='ClientToken', example='a611d038-2047-4e5b-91f2-f184c295df45'),
  deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  propertyContent?: string(name='PropertyContent', example='{   "H3C": [     "H3C S6800",     "S6850-56HF"   ],   "Huawei": [     "CE6851-48S6Q"   ] }'),
  propertyFormat?: string(name='PropertyFormat', example='JSON'),
  propertyKey?: string(name='PropertyKey', example='device_model'),
  propertyName?: string(name='PropertyName', example='厂商型号'),
}

model CreateDevicePropertyResponseBody = {
  devicePropertyId?: string(name='DevicePropertyId', example='property-z50wex75a1lkx7vx'),
  requestId?: string(name='RequestId', example='1f598491-db6d-4276-a83a-3b5f57d4a4e1'),
}

model CreateDevicePropertyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateDevicePropertyResponseBody(name='body'),
}

async function createDevicePropertyWithOptions(request: CreateDevicePropertyRequest, runtime: Util.RuntimeOptions): CreateDevicePropertyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.deviceFormId)) {
    body['DeviceFormId'] = request.deviceFormId;
  }
  if (!Util.isUnset(request.propertyContent)) {
    body['PropertyContent'] = request.propertyContent;
  }
  if (!Util.isUnset(request.propertyFormat)) {
    body['PropertyFormat'] = request.propertyFormat;
  }
  if (!Util.isUnset(request.propertyKey)) {
    body['PropertyKey'] = request.propertyKey;
  }
  if (!Util.isUnset(request.propertyName)) {
    body['PropertyName'] = request.propertyName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateDeviceProperty',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createDeviceProperty(request: CreateDevicePropertyRequest): CreateDevicePropertyResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDevicePropertyWithOptions(request, runtime);
}

model CreateDevicesRequest {
  clientToken?: string(name='ClientToken'),
  deviceFormId?: string(name='DeviceFormId'),
  deviceParamModelList?: [ 
    {
      enablePassword?: string(name='EnablePassword'),
      extAttributes?: string(name='ExtAttributes'),
      hostName?: string(name='HostName'),
      ip?: string(name='Ip'),
      loginPassword?: string(name='LoginPassword'),
      loginType?: string(name='LoginType'),
      loginUsername?: string(name='LoginUsername'),
      mac?: string(name='Mac'),
      model?: string(name='Model'),
      physicalSpaceName?: string(name='PhysicalSpaceName'),
      securityDomain?: string(name='SecurityDomain'),
      serviceStatus?: string(name='ServiceStatus'),
      sn?: string(name='Sn'),
      snmpAccountType?: string(name='SnmpAccountType'),
      snmpAccountVersion?: string(name='SnmpAccountVersion'),
      snmpAuthPassphrase?: string(name='SnmpAuthPassphrase'),
      snmpAuthProtocol?: string(name='SnmpAuthProtocol'),
      snmpCommunity?: string(name='SnmpCommunity'),
      snmpPrivacyPassphrase?: string(name='SnmpPrivacyPassphrase'),
      snmpPrivacyProtocol?: string(name='SnmpPrivacyProtocol'),
      snmpSecurityLevel?: string(name='SnmpSecurityLevel'),
      snmpUsername?: string(name='SnmpUsername'),
      vendor?: string(name='Vendor'),
    }
  ](name='DeviceParamModelList'),
  instanceId?: string(name='InstanceId'),
}

model CreateDevicesShrinkRequest {
  clientToken?: string(name='ClientToken'),
  deviceFormId?: string(name='DeviceFormId'),
  deviceParamModelListShrink?: string(name='DeviceParamModelList'),
  instanceId?: string(name='InstanceId'),
}

model CreateDevicesResponseBody = {
  deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
  requestId?: string(name='RequestId', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
}

model CreateDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateDevicesResponseBody(name='body'),
}

async function createDevicesWithOptions(tmpReq: CreateDevicesRequest, runtime: Util.RuntimeOptions): CreateDevicesResponse {
  Util.validateModel(tmpReq);
  var request = new CreateDevicesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceParamModelList)) {
    request.deviceParamModelListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceParamModelList, 'DeviceParamModelList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.deviceFormId)) {
    body['DeviceFormId'] = request.deviceFormId;
  }
  if (!Util.isUnset(request.deviceParamModelListShrink)) {
    body['DeviceParamModelList'] = request.deviceParamModelListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateDevices',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createDevices(request: CreateDevicesRequest): CreateDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDevicesWithOptions(request, runtime);
}

model CreateEventDefinitionRequest {
  clientToken?: string(name='ClientToken'),
  eventName?: string(name='EventName'),
  eventType?: string(name='EventType'),
  instanceId?: string(name='InstanceId'),
  templateId?: string(name='TemplateId'),
}

model CreateEventDefinitionResponseBody = {
  eventId?: string(name='EventId'),
  requestId?: string(name='RequestId'),
}

model CreateEventDefinitionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateEventDefinitionResponseBody(name='body'),
}

async function createEventDefinitionWithOptions(request: CreateEventDefinitionRequest, runtime: Util.RuntimeOptions): CreateEventDefinitionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.eventName)) {
    body['EventName'] = request.eventName;
  }
  if (!Util.isUnset(request.eventType)) {
    body['EventType'] = request.eventType;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.templateId)) {
    body['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateEventDefinition',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createEventDefinition(request: CreateEventDefinitionRequest): CreateEventDefinitionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createEventDefinitionWithOptions(request, runtime);
}

model CreateLinkJobRequest {
  autoConfirm?: boolean(name='AutoConfirm', description='是否自动确认'),
  doubleConvertStrategy?: string(name='DoubleConvertStrategy', description='双端链路转换策略'),
  instanceId?: string(name='InstanceId'),
  jobId?: string(name='JobId', description='任务ID'),
  singleStrategy?: string(name='SingleStrategy', description='单端链路发现策略'),
}

model CreateLinkJobResponseBody = {
  content?: string(name='Content'),
  requestId?: string(name='RequestId'),
}

model CreateLinkJobResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateLinkJobResponseBody(name='body'),
}

async function createLinkJobWithOptions(request: CreateLinkJobRequest, runtime: Util.RuntimeOptions): CreateLinkJobResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.autoConfirm)) {
    body['AutoConfirm'] = request.autoConfirm;
  }
  if (!Util.isUnset(request.doubleConvertStrategy)) {
    body['DoubleConvertStrategy'] = request.doubleConvertStrategy;
  }
  if (!Util.isUnset(request.jobId)) {
    body['JobId'] = request.jobId;
  }
  if (!Util.isUnset(request.singleStrategy)) {
    body['SingleStrategy'] = request.singleStrategy;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateLinkJob',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createLinkJob(request: CreateLinkJobRequest): CreateLinkJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLinkJobWithOptions(request, runtime);
}

model CreateMonitorItemRequest {
  alarmRuleList?: [ 
    {
      alarmStatus?: string(name='AlarmStatus', example='CRITICAL'),
      expression?: string(name='Expression', example='>'),
      value?: string(name='Value', example='100'),
      variable?: string(name='Variable', example='avg_latency'),
    }
  ](name='AlarmRuleList'),
  analysisCode?: string(name='AnalysisCode', example='/**\\n** Parsing logic\\n** @param: output :Collect raw data\\n\\n1.3.6.1.4.1.12356.101.13.2.1.1.12\\n**/\\n\\n\\nfunction parse(output){\\n  \\tvar results = {}'),
  clientToken?: string(name='ClientToken', example='c6aaac41-8cfa-4952-bb1c-1ad9617ab23f'),
  collectionType?: string(name='CollectionType', example='SNMP'),
  config?: string(name='Config', example='{\\"Type\\":\\"snmpwalk\\"}'),
  dataItem?: string(name='DataItem', example='avg_latency'),
  deviceForm?: string(name='DeviceForm'),
  effective?: int32(name='Effective', example='1'),
  execInterval?: int32(name='ExecInterval', example='60'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  monitorItemDescription?: string(name='MonitorItemDescription'),
  monitorItemName?: string(name='MonitorItemName'),
  securityDomain?: string(name='SecurityDomain', example='*'),
  type?: string(name='Type', example='SINGLE'),
}

model CreateMonitorItemShrinkRequest {
  alarmRuleListShrink?: string(name='AlarmRuleList'),
  analysisCode?: string(name='AnalysisCode', example='/**\\n** Parsing logic\\n** @param: output :Collect raw data\\n\\n1.3.6.1.4.1.12356.101.13.2.1.1.12\\n**/\\n\\n\\nfunction parse(output){\\n  \\tvar results = {}'),
  clientToken?: string(name='ClientToken', example='c6aaac41-8cfa-4952-bb1c-1ad9617ab23f'),
  collectionType?: string(name='CollectionType', example='SNMP'),
  config?: string(name='Config', example='{\\"Type\\":\\"snmpwalk\\"}'),
  dataItem?: string(name='DataItem', example='avg_latency'),
  deviceForm?: string(name='DeviceForm'),
  effective?: int32(name='Effective', example='1'),
  execInterval?: int32(name='ExecInterval', example='60'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  monitorItemDescription?: string(name='MonitorItemDescription'),
  monitorItemName?: string(name='MonitorItemName'),
  securityDomain?: string(name='SecurityDomain', example='*'),
  type?: string(name='Type', example='SINGLE'),
}

model CreateMonitorItemResponseBody = {
  monitorItemId?: string(name='MonitorItemId', example='m-c4k8xcdlxxc1x0p2'),
  requestId?: string(name='RequestId', description='Id of the request', example='BC7E67AB-7653-505E-BB78-45486035E137'),
}

model CreateMonitorItemResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateMonitorItemResponseBody(name='body'),
}

async function createMonitorItemWithOptions(tmpReq: CreateMonitorItemRequest, runtime: Util.RuntimeOptions): CreateMonitorItemResponse {
  Util.validateModel(tmpReq);
  var request = new CreateMonitorItemShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.alarmRuleList)) {
    request.alarmRuleListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.alarmRuleList, 'AlarmRuleList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.alarmRuleListShrink)) {
    body['AlarmRuleList'] = request.alarmRuleListShrink;
  }
  if (!Util.isUnset(request.analysisCode)) {
    body['AnalysisCode'] = request.analysisCode;
  }
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.collectionType)) {
    body['CollectionType'] = request.collectionType;
  }
  if (!Util.isUnset(request.config)) {
    body['Config'] = request.config;
  }
  if (!Util.isUnset(request.dataItem)) {
    body['DataItem'] = request.dataItem;
  }
  if (!Util.isUnset(request.deviceForm)) {
    body['DeviceForm'] = request.deviceForm;
  }
  if (!Util.isUnset(request.effective)) {
    body['Effective'] = request.effective;
  }
  if (!Util.isUnset(request.execInterval)) {
    body['ExecInterval'] = request.execInterval;
  }
  if (!Util.isUnset(request.monitorItemDescription)) {
    body['MonitorItemDescription'] = request.monitorItemDescription;
  }
  if (!Util.isUnset(request.monitorItemName)) {
    body['MonitorItemName'] = request.monitorItemName;
  }
  if (!Util.isUnset(request.securityDomain)) {
    body['SecurityDomain'] = request.securityDomain;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateMonitorItem',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createMonitorItem(request: CreateMonitorItemRequest): CreateMonitorItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMonitorItemWithOptions(request, runtime);
}

model CreateOsVersionRequest {
  bootPatch?: string(name='BootPatch', example='{"name":"xxx/yyy"}'),
  clientToken?: string(name='ClientToken', example='clientToken'),
  createTime?: string(name='CreateTime', description='代表创建时间的资源属性字段', example='createTime'),
  featurePatch?: string(name='FeaturePatch', example='{"name":"xxx/yyy"}'),
  fileName?: string(name='FileName', description='文件名', example='zzz'),
  filePath?: string(name='FilePath', description='文件路径', example='/xxx/zzz'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  model?: string(name='Model', description='型号', example='6510'),
  osVersion?: string(name='OsVersion', description='系统版本', example='1.0'),
  status?: string(name='Status', description='状态', example='USED、UNUSED'),
  systemPatch?: string(name='SystemPatch', example='{"name":"xxx/yyy"}'),
  vendor?: string(name='Vendor', description='厂商', example='Ruijie'),
}

model CreateOsVersionResponseBody = {
  osVersionId?: string(name='OsVersionId', example='osVersionId'),
  requestId?: string(name='RequestId', example='requestId'),
}

model CreateOsVersionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateOsVersionResponseBody(name='body'),
}

async function createOsVersionWithOptions(request: CreateOsVersionRequest, runtime: Util.RuntimeOptions): CreateOsVersionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bootPatch)) {
    body['BootPatch'] = request.bootPatch;
  }
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.createTime)) {
    body['CreateTime'] = request.createTime;
  }
  if (!Util.isUnset(request.featurePatch)) {
    body['FeaturePatch'] = request.featurePatch;
  }
  if (!Util.isUnset(request.fileName)) {
    body['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.filePath)) {
    body['FilePath'] = request.filePath;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.osVersion)) {
    body['OsVersion'] = request.osVersion;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  if (!Util.isUnset(request.systemPatch)) {
    body['SystemPatch'] = request.systemPatch;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateOsVersion',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createOsVersion(request: CreateOsVersionRequest): CreateOsVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return createOsVersionWithOptions(request, runtime);
}

model CreatePhysicalSpaceRequest {
  address?: string(name='Address', example='文一西路969号'),
  city?: string(name='City', example='杭州市'),
  clientToken?: string(name='ClientToken', example='8e61b7dd-fc6c-44e4-bb9c-427b0a09a6f3'),
  country?: string(name='Country', example='中国'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  owner?: string(name='Owner', example='张三'),
  parentUid?: string(name='ParentUid', example='space-twnepeeloclxxxxx'),
  physicalSpaceName?: string(name='PhysicalSpaceName', example='阿里巴巴西溪园区'),
  province?: string(name='Province', example='浙江省'),
  remark?: string(name='Remark'),
  securityDomainList?: [ string ](name='SecurityDomainList'),
  spaceAbbreviation?: string(name='SpaceAbbreviation', example='yq'),
  spaceType?: string(name='SpaceType', example='园区'),
}

model CreatePhysicalSpaceShrinkRequest {
  address?: string(name='Address', example='文一西路969号'),
  city?: string(name='City', example='杭州市'),
  clientToken?: string(name='ClientToken', example='8e61b7dd-fc6c-44e4-bb9c-427b0a09a6f3'),
  country?: string(name='Country', example='中国'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  owner?: string(name='Owner', example='张三'),
  parentUid?: string(name='ParentUid', example='space-twnepeeloclxxxxx'),
  physicalSpaceName?: string(name='PhysicalSpaceName', example='阿里巴巴西溪园区'),
  province?: string(name='Province', example='浙江省'),
  remark?: string(name='Remark'),
  securityDomainListShrink?: string(name='SecurityDomainList'),
  spaceAbbreviation?: string(name='SpaceAbbreviation', example='yq'),
  spaceType?: string(name='SpaceType', example='园区'),
}

model CreatePhysicalSpaceResponseBody = {
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
  requestId?: string(name='RequestId', example='a1c7e2b4-174e-4557-a96d-d4cbf83988a6'),
}

model CreatePhysicalSpaceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreatePhysicalSpaceResponseBody(name='body'),
}

async function createPhysicalSpaceWithOptions(tmpReq: CreatePhysicalSpaceRequest, runtime: Util.RuntimeOptions): CreatePhysicalSpaceResponse {
  Util.validateModel(tmpReq);
  var request = new CreatePhysicalSpaceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.securityDomainList)) {
    request.securityDomainListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.securityDomainList, 'SecurityDomainList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.address)) {
    body['Address'] = request.address;
  }
  if (!Util.isUnset(request.city)) {
    body['City'] = request.city;
  }
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.owner)) {
    body['Owner'] = request.owner;
  }
  if (!Util.isUnset(request.parentUid)) {
    body['ParentUid'] = request.parentUid;
  }
  if (!Util.isUnset(request.physicalSpaceName)) {
    body['PhysicalSpaceName'] = request.physicalSpaceName;
  }
  if (!Util.isUnset(request.province)) {
    body['Province'] = request.province;
  }
  if (!Util.isUnset(request.remark)) {
    body['Remark'] = request.remark;
  }
  if (!Util.isUnset(request.securityDomainListShrink)) {
    body['SecurityDomainList'] = request.securityDomainListShrink;
  }
  if (!Util.isUnset(request.spaceAbbreviation)) {
    body['SpaceAbbreviation'] = request.spaceAbbreviation;
  }
  if (!Util.isUnset(request.spaceType)) {
    body['SpaceType'] = request.spaceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreatePhysicalSpace',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createPhysicalSpace(request: CreatePhysicalSpaceRequest): CreatePhysicalSpaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPhysicalSpaceWithOptions(request, runtime);
}

model CreateRealtimeTaskRequest {
  checkDuplicatePolicy?: string(name='CheckDuplicatePolicy', description='检查策略，是否进行已有设备ID和巡检项的检查。
- ERROR：不忽略，如果有运行中则报错。
- IGNORE：忽略重复检查。
- CURRENT：不忽略，如果有运行中则返回运行中。', example='CURRENT'),
  clientToken?: string(name='ClientToken', description='幂等校验 token。', example='2dbeba0-555c-1a3f-8e11-3a235e4412'),
  deviceId?: string(name='DeviceId', example='DEVICE-sd-389-sd'),
  instanceId?: string(name='InstanceId', description='实例ID。', example='cmn-cn-xxx'),
  itemName?: string(name='ItemName', description='巡检项名字。', example='test'),
  script?: string(name='Script', example='import json'),
}

model CreateRealtimeTaskResponseBody = {
  requestId?: string(name='RequestId', example='AC8F05E6-AFBB-4ABE-B75E-A6539A9BAAA8'),
  taskId?: string(name='TaskId', example='TASKwef-weds'),
}

model CreateRealtimeTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateRealtimeTaskResponseBody(name='body'),
}

async function createRealtimeTaskWithOptions(request: CreateRealtimeTaskRequest, runtime: Util.RuntimeOptions): CreateRealtimeTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.checkDuplicatePolicy)) {
    body['CheckDuplicatePolicy'] = request.checkDuplicatePolicy;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.itemName)) {
    body['ItemName'] = request.itemName;
  }
  if (!Util.isUnset(request.script)) {
    body['Script'] = request.script;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateRealtimeTask',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createRealtimeTask(request: CreateRealtimeTaskRequest): CreateRealtimeTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createRealtimeTaskWithOptions(request, runtime);
}

model CreateResourceInformationRequest {
  architectureId?: string(name='ArchitectureId', example='architectureId'),
  clientToken?: string(name='ClientToken', example='clientToken'),
  information?: [ 
    {
      key?: string(name='Key', description='键', example='IP'),
      keyAction?: string(name='KeyAction', description='键动作', example='/xxx/zzz'),
      keyAttribute?: string(name='KeyAttribute', description='键属性', example='IP地址'),
      keyDescription?: string(name='KeyDescription', description='键描述', example='Ip地址'),
    }
  ](name='Information', description='信息'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  resourceAttribute?: string(name='ResourceAttribute', description='资源属性', example='6510'),
  resourceType?: string(name='ResourceType', description='资源类型', example='CMDB'),
}

model CreateResourceInformationResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
  resourceInformationId?: string(name='ResourceInformationId', example='resourceInformationId'),
}

model CreateResourceInformationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateResourceInformationResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param request CreateResourceInformationRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return CreateResourceInformationResponse
 */
// Deprecated
async function createResourceInformationWithOptions(request: CreateResourceInformationRequest, runtime: Util.RuntimeOptions): CreateResourceInformationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.architectureId)) {
    body['ArchitectureId'] = request.architectureId;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.information)) {
    bodyFlat['Information'] = request.information;
  }
  if (!Util.isUnset(request.resourceAttribute)) {
    body['ResourceAttribute'] = request.resourceAttribute;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateResourceInformation',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request CreateResourceInformationRequest
  * @return CreateResourceInformationResponse
 */
// Deprecated
async function createResourceInformation(request: CreateResourceInformationRequest): CreateResourceInformationResponse {
  var runtime = new Util.RuntimeOptions{};
  return createResourceInformationWithOptions(request, runtime);
}

model CreateSetupProjectRequest {
  deliveryTime?: string(name='DeliveryTime', description='代表创建时间的资源属性字段', example='2021-02-01'),
  description?: string(name='Description', description='描述', example='建设交付项目'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  spaceId?: string(name='SpaceId', description='物理空间uId', example='xxxyyy'),
}

model CreateSetupProjectResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
  setupProjectId?: string(name='SetupProjectId', example='setupProjectId'),
}

model CreateSetupProjectResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateSetupProjectResponseBody(name='body'),
}

async function createSetupProjectWithOptions(request: CreateSetupProjectRequest, runtime: Util.RuntimeOptions): CreateSetupProjectResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deliveryTime)) {
    body['DeliveryTime'] = request.deliveryTime;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.spaceId)) {
    body['SpaceId'] = request.spaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateSetupProject',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createSetupProject(request: CreateSetupProjectRequest): CreateSetupProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSetupProjectWithOptions(request, runtime);
}

model CreateSpaceModelRequest {
  clientToken?: string(name='ClientToken', example='clientToken'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  sort?: [ 
    {
      level?: long(name='Level', example='1'),
      levelName?: string(name='LevelName', example='园区'),
    }
  ](name='Sort'),
  spaceType?: string(name='SpaceType', description='物理空间类型', example='园区'),
}

model CreateSpaceModelShrinkRequest {
  clientToken?: string(name='ClientToken', example='clientToken'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  sortShrink?: string(name='Sort'),
  spaceType?: string(name='SpaceType', description='物理空间类型', example='园区'),
}

model CreateSpaceModelResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
  spaceModelId?: string(name='SpaceModelId', example='spaceModelId'),
}

model CreateSpaceModelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateSpaceModelResponseBody(name='body'),
}

async function createSpaceModelWithOptions(tmpReq: CreateSpaceModelRequest, runtime: Util.RuntimeOptions): CreateSpaceModelResponse {
  Util.validateModel(tmpReq);
  var request = new CreateSpaceModelShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.sortShrink)) {
    body['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.spaceType)) {
    body['SpaceType'] = request.spaceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateSpaceModel',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createSpaceModel(request: CreateSpaceModelRequest): CreateSpaceModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSpaceModelWithOptions(request, runtime);
}

model CreateTaskRequest {
  clientToken?: string(name='ClientToken'),
  instanceId?: string(name='InstanceId'),
  params?: string(name='Params'),
  templateId?: string(name='TemplateId'),
}

model CreateTaskResponseBody = {
  requestId?: string(name='RequestId'),
  taskId?: string(name='TaskId'),
}

model CreateTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateTaskResponseBody(name='body'),
}

async function createTaskWithOptions(request: CreateTaskRequest, runtime: Util.RuntimeOptions): CreateTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.params)) {
    body['Params'] = request.params;
  }
  if (!Util.isUnset(request.templateId)) {
    body['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateTask',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createTask(request: CreateTaskRequest): CreateTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTaskWithOptions(request, runtime);
}

model CreateTimePeriodRequest {
  clientToken?: string(name='ClientToken'),
  expression?: string(name='Expression'),
  instanceId?: string(name='InstanceId'),
  timePeriodDescription?: string(name='TimePeriodDescription'),
  timePeriodName?: string(name='TimePeriodName'),
}

model CreateTimePeriodResponseBody = {
  requestId?: string(name='RequestId'),
  timePeriodId?: string(name='TimePeriodId'),
}

model CreateTimePeriodResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateTimePeriodResponseBody(name='body'),
}

async function createTimePeriodWithOptions(request: CreateTimePeriodRequest, runtime: Util.RuntimeOptions): CreateTimePeriodResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.expression)) {
    body['Expression'] = request.expression;
  }
  if (!Util.isUnset(request.timePeriodDescription)) {
    body['TimePeriodDescription'] = request.timePeriodDescription;
  }
  if (!Util.isUnset(request.timePeriodName)) {
    body['TimePeriodName'] = request.timePeriodName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateTimePeriod',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createTimePeriod(request: CreateTimePeriodRequest): CreateTimePeriodResponse {
  var runtime = new Util.RuntimeOptions{};
  return createTimePeriodWithOptions(request, runtime);
}

model DeleteConfigurationSpecificationRequest {
  configurationSpecificationId?: string(name='ConfigurationSpecificationId', example='configurationSpecificationId'),
  instanceId?: string(name='InstanceId', example='instanceId'),
}

model DeleteConfigurationSpecificationResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
}

model DeleteConfigurationSpecificationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteConfigurationSpecificationResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param request DeleteConfigurationSpecificationRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return DeleteConfigurationSpecificationResponse
 */
// Deprecated
async function deleteConfigurationSpecificationWithOptions(request: DeleteConfigurationSpecificationRequest, runtime: Util.RuntimeOptions): DeleteConfigurationSpecificationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.configurationSpecificationId)) {
    body['ConfigurationSpecificationId'] = request.configurationSpecificationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteConfigurationSpecification',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request DeleteConfigurationSpecificationRequest
  * @return DeleteConfigurationSpecificationResponse
 */
// Deprecated
async function deleteConfigurationSpecification(request: DeleteConfigurationSpecificationRequest): DeleteConfigurationSpecificationResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteConfigurationSpecificationWithOptions(request, runtime);
}

model DeleteConfigurationVariateRequest {
  configurationVariateId?: string(name='ConfigurationVariateId', example='configurationVariateId'),
  instanceId?: string(name='InstanceId', example='instanceId'),
}

model DeleteConfigurationVariateResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
}

model DeleteConfigurationVariateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteConfigurationVariateResponseBody(name='body'),
}

async function deleteConfigurationVariateWithOptions(request: DeleteConfigurationVariateRequest, runtime: Util.RuntimeOptions): DeleteConfigurationVariateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.configurationVariateId)) {
    body['ConfigurationVariateId'] = request.configurationVariateId;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteConfigurationVariate',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteConfigurationVariate(request: DeleteConfigurationVariateRequest): DeleteConfigurationVariateResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteConfigurationVariateWithOptions(request, runtime);
}

model DeleteDedicatedLineRequest {
  dedicatedLineId?: string(name='DedicatedLineId', example='space_isp-6dk5xpoyoopr6obf'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
}

model DeleteDedicatedLineResponseBody = {
  requestId?: string(name='RequestId', example='8de935f6-90c7-444e-a2b4-bb4185153435'),
}

model DeleteDedicatedLineResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDedicatedLineResponseBody(name='body'),
}

async function deleteDedicatedLineWithOptions(request: DeleteDedicatedLineRequest, runtime: Util.RuntimeOptions): DeleteDedicatedLineResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.dedicatedLineId)) {
    body['DedicatedLineId'] = request.dedicatedLineId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDedicatedLine',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDedicatedLine(request: DeleteDedicatedLineRequest): DeleteDedicatedLineResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDedicatedLineWithOptions(request, runtime);
}

model DeleteDeliveryArchVersionRequest {
  deliveryArchVersionId?: string(name='DeliveryArchVersionId'),
  instanceId?: string(name='InstanceId'),
}

model DeleteDeliveryArchVersionResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteDeliveryArchVersionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDeliveryArchVersionResponseBody(name='body'),
}

async function deleteDeliveryArchVersionWithOptions(request: DeleteDeliveryArchVersionRequest, runtime: Util.RuntimeOptions): DeleteDeliveryArchVersionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deliveryArchVersionId)) {
    body['DeliveryArchVersionId'] = request.deliveryArchVersionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDeliveryArchVersion',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDeliveryArchVersion(request: DeleteDeliveryArchVersionRequest): DeleteDeliveryArchVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDeliveryArchVersionWithOptions(request, runtime);
}

model DeleteDeliveryProjectRequest {
  deliveryProjectId?: string(name='DeliveryProjectId'),
  instanceId?: string(name='InstanceId'),
}

model DeleteDeliveryProjectResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteDeliveryProjectResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDeliveryProjectResponseBody(name='body'),
}

async function deleteDeliveryProjectWithOptions(request: DeleteDeliveryProjectRequest, runtime: Util.RuntimeOptions): DeleteDeliveryProjectResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deliveryProjectId)) {
    body['DeliveryProjectId'] = request.deliveryProjectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDeliveryProject',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDeliveryProject(request: DeleteDeliveryProjectRequest): DeleteDeliveryProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDeliveryProjectWithOptions(request, runtime);
}

model DeleteDeviceRequest {
  deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
}

model DeleteDeviceResponseBody = {
  requestId?: string(name='RequestId', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
}

model DeleteDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDeviceResponseBody(name='body'),
}

async function deleteDeviceWithOptions(request: DeleteDeviceRequest, runtime: Util.RuntimeOptions): DeleteDeviceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDevice',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDevice(request: DeleteDeviceRequest): DeleteDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDeviceWithOptions(request, runtime);
}

model DeleteDeviceFormRequest {
  deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
}

model DeleteDeviceFormResponseBody = {
  requestId?: string(name='RequestId', example='6d439436-ddde-4f26-aaf6-0470099b5c35'),
}

model DeleteDeviceFormResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDeviceFormResponseBody(name='body'),
}

async function deleteDeviceFormWithOptions(request: DeleteDeviceFormRequest, runtime: Util.RuntimeOptions): DeleteDeviceFormResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceFormId)) {
    body['DeviceFormId'] = request.deviceFormId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDeviceForm',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDeviceForm(request: DeleteDeviceFormRequest): DeleteDeviceFormResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDeviceFormWithOptions(request, runtime);
}

model DeleteDevicePropertyRequest {
  devicePropertyId?: string(name='DevicePropertyId', example='property-z50wex75a1lkx7vx'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
}

model DeleteDevicePropertyResponseBody = {
  requestId?: string(name='RequestId', example='1f598491-db6d-4276-a83a-3b5f57d4a4e1'),
}

model DeleteDevicePropertyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDevicePropertyResponseBody(name='body'),
}

async function deleteDevicePropertyWithOptions(request: DeleteDevicePropertyRequest, runtime: Util.RuntimeOptions): DeleteDevicePropertyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.devicePropertyId)) {
    body['DevicePropertyId'] = request.devicePropertyId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDeviceProperty',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDeviceProperty(request: DeleteDevicePropertyRequest): DeleteDevicePropertyResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDevicePropertyWithOptions(request, runtime);
}

model DeleteDeviceResourceRequest {
  deviceResourceId?: string(name='DeviceResourceId', example='deviceResourceId'),
  instanceId?: string(name='InstanceId', example='instanceId'),
}

model DeleteDeviceResourceResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
}

model DeleteDeviceResourceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDeviceResourceResponseBody(name='body'),
}

async function deleteDeviceResourceWithOptions(request: DeleteDeviceResourceRequest, runtime: Util.RuntimeOptions): DeleteDeviceResourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.deviceResourceId)) {
    query['DeviceResourceId'] = request.deviceResourceId;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDeviceResource',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDeviceResource(request: DeleteDeviceResourceRequest): DeleteDeviceResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDeviceResourceWithOptions(request, runtime);
}

model DeleteDevicesRequest {
  deviceIds?: [ string ](name='DeviceIds', example='device-evve560juend5owh'),
  instanceId?: string(name='InstanceId'),
}

model DeleteDevicesShrinkRequest {
  deviceIdsShrink?: string(name='DeviceIds', example='device-evve560juend5owh'),
  instanceId?: string(name='InstanceId'),
}

model DeleteDevicesResponseBody = {
  requestId?: string(name='RequestId', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
}

model DeleteDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDevicesResponseBody(name='body'),
}

async function deleteDevicesWithOptions(tmpReq: DeleteDevicesRequest, runtime: Util.RuntimeOptions): DeleteDevicesResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteDevicesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceIds)) {
    request.deviceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceIds, 'DeviceIds', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceIdsShrink)) {
    body['DeviceIds'] = request.deviceIdsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDevices',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDevices(request: DeleteDevicesRequest): DeleteDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDevicesWithOptions(request, runtime);
}

model DeleteEventDefinitionRequest {
  eventId?: string(name='EventId', example='e-1dc19dc0v'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
}

model DeleteEventDefinitionResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteEventDefinitionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteEventDefinitionResponseBody(name='body'),
}

async function deleteEventDefinitionWithOptions(request: DeleteEventDefinitionRequest, runtime: Util.RuntimeOptions): DeleteEventDefinitionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.eventId)) {
    body['EventId'] = request.eventId;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteEventDefinition',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteEventDefinition(request: DeleteEventDefinitionRequest): DeleteEventDefinitionResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteEventDefinitionWithOptions(request, runtime);
}

model DeleteInspectionTaskRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  taskId?: string(name='TaskId', example='TASK0489b577-33b3-4991-bdc5-1cdabc1a82e2'),
}

model DeleteInspectionTaskResponseBody = {
  requestId?: string(name='RequestId', example='AC8F05E6-AFBB-4ABE-B75E-A6539A9BAAA8'),
}

model DeleteInspectionTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteInspectionTaskResponseBody(name='body'),
}

async function deleteInspectionTaskWithOptions(request: DeleteInspectionTaskRequest, runtime: Util.RuntimeOptions): DeleteInspectionTaskResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteInspectionTask',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteInspectionTask(request: DeleteInspectionTaskRequest): DeleteInspectionTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteInspectionTaskWithOptions(request, runtime);
}

model DeleteOsVersionRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  osVersionId?: string(name='OsVersionId', example='osVersionId'),
}

model DeleteOsVersionResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
}

model DeleteOsVersionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteOsVersionResponseBody(name='body'),
}

async function deleteOsVersionWithOptions(request: DeleteOsVersionRequest, runtime: Util.RuntimeOptions): DeleteOsVersionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.osVersionId)) {
    body['OsVersionId'] = request.osVersionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteOsVersion',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteOsVersion(request: DeleteOsVersionRequest): DeleteOsVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteOsVersionWithOptions(request, runtime);
}

model DeletePhysicalSpaceRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
}

model DeletePhysicalSpaceResponseBody = {
  requestId?: string(name='RequestId', example='a1c7e2b4-174e-4557-a96d-d4cbf83988a6'),
}

model DeletePhysicalSpaceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeletePhysicalSpaceResponseBody(name='body'),
}

async function deletePhysicalSpaceWithOptions(request: DeletePhysicalSpaceRequest, runtime: Util.RuntimeOptions): DeletePhysicalSpaceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.physicalSpaceId)) {
    body['PhysicalSpaceId'] = request.physicalSpaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeletePhysicalSpace',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deletePhysicalSpace(request: DeletePhysicalSpaceRequest): DeletePhysicalSpaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePhysicalSpaceWithOptions(request, runtime);
}

model DeleteResourceInformationRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  resourceInformationId?: string(name='ResourceInformationId', example='resourceInformationId'),
}

model DeleteResourceInformationResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
}

model DeleteResourceInformationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteResourceInformationResponseBody(name='body'),
}

async function deleteResourceInformationWithOptions(request: DeleteResourceInformationRequest, runtime: Util.RuntimeOptions): DeleteResourceInformationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.resourceInformationId)) {
    body['ResourceInformationId'] = request.resourceInformationId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteResourceInformation',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteResourceInformation(request: DeleteResourceInformationRequest): DeleteResourceInformationResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteResourceInformationWithOptions(request, runtime);
}

model DeleteSetupProjectRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  setupProjectId?: string(name='SetupProjectId', example='setupProjectId'),
}

model DeleteSetupProjectResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
}

model DeleteSetupProjectResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteSetupProjectResponseBody(name='body'),
}

async function deleteSetupProjectWithOptions(request: DeleteSetupProjectRequest, runtime: Util.RuntimeOptions): DeleteSetupProjectResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.setupProjectId)) {
    body['SetupProjectId'] = request.setupProjectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSetupProject',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteSetupProject(request: DeleteSetupProjectRequest): DeleteSetupProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSetupProjectWithOptions(request, runtime);
}

model DeleteSpaceModelRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  spaceModelId?: string(name='SpaceModelId', example='spaceModelId'),
}

model DeleteSpaceModelResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
}

model DeleteSpaceModelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteSpaceModelResponseBody(name='body'),
}

async function deleteSpaceModelWithOptions(request: DeleteSpaceModelRequest, runtime: Util.RuntimeOptions): DeleteSpaceModelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.spaceModelId)) {
    query['SpaceModelId'] = request.spaceModelId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSpaceModel',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteSpaceModel(request: DeleteSpaceModelRequest): DeleteSpaceModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSpaceModelWithOptions(request, runtime);
}

model DisableNotificationRequest {
  expiryTime?: string(name='ExpiryTime', example='2021-01-01 00:01:00'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  list?: [ 
    {
      aggregateDataId?: string(name='AggregateDataId', example='a-52gmqniln3u53n32'),
      appId?: string(name='AppId', example='app-52gmqniln3u53n32'),
      dedicatedLineId?: string(name='DedicatedLineId', example='d-52gmqniln3u53n32'),
      deviceId?: string(name='DeviceId', example='device-jrjb476ub06'),
      eventId?: string(name='EventId', example='e-f641qv4eg6u4fgd6'),
      eventObjectId?: string(name='EventObjectId', example='192.xxx.xxx.xxx【100GE2/2/0/8】:linkDown'),
      monitorItemId?: string(name='MonitorItemId', example='m-22ut5sn54o35wsz6'),
      portCollectionId?: string(name='PortCollectionId', example='p-52gmqniln3u53n32'),
      type?: string(name='Type', example='SINGLE'),
    }
  ](name='List', example='Temporarily Closed'),
  reason?: string(name='Reason', example='Temporarily Closed'),
}

model DisableNotificationShrinkRequest {
  expiryTime?: string(name='ExpiryTime', example='2021-01-01 00:01:00'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  listShrink?: string(name='List', example='Temporarily Closed'),
  reason?: string(name='Reason', example='Temporarily Closed'),
}

model DisableNotificationResponseBody = {
  requestId?: string(name='RequestId', example='AC8F05E6-AFBB-4AAE-B75E-A6539A9BAAA8'),
}

model DisableNotificationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DisableNotificationResponseBody(name='body'),
}

async function disableNotificationWithOptions(tmpReq: DisableNotificationRequest, runtime: Util.RuntimeOptions): DisableNotificationResponse {
  Util.validateModel(tmpReq);
  var request = new DisableNotificationShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.list)) {
    request.listShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.list, 'List', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.expiryTime)) {
    body['ExpiryTime'] = request.expiryTime;
  }
  if (!Util.isUnset(request.listShrink)) {
    body['List'] = request.listShrink;
  }
  if (!Util.isUnset(request.reason)) {
    body['Reason'] = request.reason;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DisableNotification',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function disableNotification(request: DisableNotificationRequest): DisableNotificationResponse {
  var runtime = new Util.RuntimeOptions{};
  return disableNotificationWithOptions(request, runtime);
}

model DownloadDeviceResourceRequest {
  deviceResourceId?: string(name='DeviceResourceId', example='deviceResourceId'),
  deviceResourceIds?: [ string ](name='DeviceResourceIds'),
  downloadType?: string(name='DownloadType', example='CONNECTION'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  setupProjectId?: string(name='SetupProjectId', example='zzz'),
}

model DownloadDeviceResourceShrinkRequest {
  deviceResourceId?: string(name='DeviceResourceId', example='deviceResourceId'),
  deviceResourceIdsShrink?: string(name='DeviceResourceIds'),
  downloadType?: string(name='DownloadType', example='CONNECTION'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  setupProjectId?: string(name='SetupProjectId', example='zzz'),
}

model DownloadDeviceResourceResponseBody = {
  downloadUrl?: string(name='DownloadUrl', example='https://xxxyyy'),
  requestId?: string(name='RequestId', example='requestId'),
}

model DownloadDeviceResourceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DownloadDeviceResourceResponseBody(name='body'),
}

async function downloadDeviceResourceWithOptions(tmpReq: DownloadDeviceResourceRequest, runtime: Util.RuntimeOptions): DownloadDeviceResourceResponse {
  Util.validateModel(tmpReq);
  var request = new DownloadDeviceResourceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceResourceIds)) {
    request.deviceResourceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceResourceIds, 'DeviceResourceIds', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DownloadDeviceResource',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function downloadDeviceResource(request: DownloadDeviceResourceRequest): DownloadDeviceResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return downloadDeviceResourceWithOptions(request, runtime);
}

model EnableNotificationRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  list?: [ 
    {
      aggregateDataId?: string(name='AggregateDataId', example='a-52gmqniln3u53n32'),
      appId?: string(name='AppId', example='app-52gmqniln3u53n32'),
      dedicatedLineId?: string(name='DedicatedLineId', example='d-jrjb476ub06'),
      deviceId?: string(name='DeviceId', example='device-jrjb476ub06'),
      eventId?: string(name='EventId', example='e-f641qv4eg6u4fgd6'),
      eventObjectId?: string(name='EventObjectId', example='192.xxx.xxx.xxx【100GE2/2/0/8】:linkDown'),
      monitorItemId?: string(name='MonitorItemId', example='m-22ut5sn54o35wsz6'),
      portCollectionId?: string(name='PortCollectionId', example='p-52gmqniln3u53n32'),
      type?: string(name='Type', example='SINGLE'),
    }
  ](name='List', example='EnableNotification'),
}

model EnableNotificationShrinkRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  listShrink?: string(name='List', example='EnableNotification'),
}

model EnableNotificationResponseBody = {
  requestId?: string(name='RequestId', example='AC8F05E6-AFBB-4AAE-B75E-A6539A9BAAA8'),
}

model EnableNotificationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EnableNotificationResponseBody(name='body'),
}

async function enableNotificationWithOptions(tmpReq: EnableNotificationRequest, runtime: Util.RuntimeOptions): EnableNotificationResponse {
  Util.validateModel(tmpReq);
  var request = new EnableNotificationShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.list)) {
    request.listShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.list, 'List', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.listShrink)) {
    body['List'] = request.listShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'EnableNotification',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function enableNotification(request: EnableNotificationRequest): EnableNotificationResponse {
  var runtime = new Util.RuntimeOptions{};
  return enableNotificationWithOptions(request, runtime);
}

model GetAlarmStatusRequest {
  aggregateDataId?: string(name='AggregateDataId', example='a-52gmqniln3u53n32'),
  appId?: string(name='AppId', example='app-52gmqniln3u53n32'),
  dedicatedLineId?: string(name='DedicatedLineId', example='d-52gmqniln3u53n32'),
  deviceId?: string(name='DeviceId', example='device-jrjb476ub06'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  monitorItemId?: string(name='MonitorItemId', example='m-22ut5sn54o35wsz6'),
  portCollectionId?: string(name='PortCollectionId', example='p-52gmqniln3u53n32'),
  type?: string(name='Type', example='SINGLE'),
}

model GetAlarmStatusResponseBody = {
  alarmStatus?: {
    abnormalDataItem?: string(name='AbnormalDataItem', example='[{"avg_latency":4.51}]'),
    agentIp?: string(name='AgentIp', example='127.0.0.1'),
    aggregateData?: {
      aggregateDataDescription?: string(name='AggregateDataDescription', description='描述', example='avg latency avg'),
      aggregateDataId?: string(name='AggregateDataId', description='聚合数据ID', example='a-52gmqniln3u53n32'),
      aggregateDataName?: string(name='AggregateDataName', description='聚合数据名称', example='avg_latency_avg'),
      aggregateMode?: string(name='AggregateMode', description='聚合方式', example='SUM'),
      dataItem?: string(name='DataItem', description='数据项', example='latency'),
      deviceId?: string(name='DeviceId', description='设备ID', example='device-jrjb476ub06'),
      isAllDevice?: int32(name='IsAllDevice', description='是否聚合全部设备', example='0'),
      monitorItemId?: string(name='MonitorItemId', description='监控项ID', example='m-22ut5sn54o35wsz6'),
    }(name='AggregateData'),
    aggregateDataId?: string(name='AggregateDataId', example='a-52gmqniln3u53n32'),
    alarmRule?: string(name='AlarmRule', example='{"alarmStatus":"WARNING","expression":">=","variable":"avg-latency","monitorItemId":"m-52gmqniln3u53n32","type":"SINGLE","value":"0"}'),
    alarmStatus?: string(name='AlarmStatus', example='WARNING'),
    appId?: string(name='AppId', example='app-52gmqniln3u53n32'),
    collectionTime?: string(name='CollectionTime', example='2021-01-01 00:01:00'),
    dedicatedLine?: {
      bandwidth?: string(name='Bandwidth', example='100'),
      dedicatedLineGateway?: string(name='DedicatedLineGateway', example='127.0.0.1'),
      dedicatedLineName?: string(name='DedicatedLineName', example='银泰武林店_电信'),
      deviceId?: string(name='DeviceId', example='device-jrjb476ub06'),
      ip?: string(name='Ip', example='127.0.0.1'),
      portName?: string(name='PortName', example='GigabitEthernet1/0/0'),
      space?: string(name='Space', example='银泰武林店'),
    }(name='DedicatedLine'),
    dedicatedLineId?: string(name='DedicatedLineId', example='d-52gmqniln3u53n32'),
    deviceId?: string(name='DeviceId', example='device-jrjb476ub06'),
    firstAbnormalTime?: string(name='FirstAbnormalTime', example='2021-01-01 00:01:00'),
    monitorItem?: {
      collectionType?: string(name='CollectionType', example='PING'),
      deviceForm?: string(name='DeviceForm', example='网络设备'),
      effective?: long(name='Effective', example='1'),
      execInterval?: string(name='ExecInterval', example='60'),
      monitorItemDescription?: string(name='MonitorItemDescription', example='连通性监控'),
      monitorItemId?: string(name='MonitorItemId', example='m-22ut5sn54o35wsz6'),
      monitorItemName?: string(name='MonitorItemName', example='Ping_Monitor'),
      securityDomain?: string(name='SecurityDomain', example='YT'),
    }(name='MonitorItem'),
    monitorItemId?: string(name='MonitorItemId', example='m-22ut5sn54o35wsz6'),
    notificationSwitch?: {
      expiryTime?: string(name='ExpiryTime', example='2021-01-01 00:01:00'),
      reason?: string(name='Reason', example='Temporarily Closed'),
    }(name='NotificationSwitch'),
    portCollection?: {
      portCollectionDescription?: string(name='PortCollectionDescription', example='端口集描述'),
      portCollectionId?: string(name='PortCollectionId', example='p-l3oo18oaz1n1cnfp'),
      portCollectionName?: string(name='PortCollectionName', example='端口集'),
      portList?: [ 
        {
          deviceId?: string(name='DeviceId', example='device-9jv4joxowp43whjx'),
          portName?: string(name='PortName', example='端口名'),
          resourceDevice?: {
            hostName?: string(name='HostName', example='设备名'),
            ip?: string(name='Ip', example='127.0.0.1'),
            securityDomain?: string(name='SecurityDomain', example='HZ'),
          }(name='ResourceDevice'),
        }
      ](name='PortList'),
    }(name='PortCollection'),
    portCollectionId?: string(name='PortCollectionId', example='p-fwq29cmatva28'),
    receiveTime?: string(name='ReceiveTime', example='2021-01-01 00:01:00'),
    resourceApp?: {
      appId?: string(name='AppId', example='app-0ijhb6yujk'),
      domain?: string(name='Domain', example='www.example.com'),
      port?: string(name='Port', example='3306'),
      securityDomain?: string(name='SecurityDomain', example='TEST002'),
      type?: string(name='Type', example='SINGLE'),
    }(name='ResourceApp'),
    resourceDevice?: {
      deviceForm?: string(name='DeviceForm', example='网络设备'),
      deviceId?: string(name='DeviceId', example='device-jrjb476ub06'),
      hostName?: string(name='HostName', example='CSW-HZ3.YT'),
      ip?: string(name='Ip', example='127.0.0.1'),
      model?: string(name='Model', example='H3C-7500'),
      securityDomain?: string(name='SecurityDomain', example='YT'),
      sn?: string(name='Sn', example='123456'),
      space?: string(name='Space', example='银泰武林店'),
      status?: string(name='Status', example='online'),
      vendor?: string(name='Vendor', example='H3C'),
    }(name='ResourceDevice'),
    responseCode?: string(name='ResponseCode', example='OK'),
    result?: string(name='Result', example='{"loss_rate":"0","avg-latency":"4.51"}'),
    uniqueKey?: string(name='UniqueKey', example='d-fwq29cmatva28_m-52gmqniln3u53n32'),
  }(name='AlarmStatus'),
  requestId?: string(name='RequestId', example='AC8F05E6-AFBB-4AAE-B75E-A6539A9BAAA8'),
}

model GetAlarmStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetAlarmStatusResponseBody(name='body'),
}

async function getAlarmStatusWithOptions(request: GetAlarmStatusRequest, runtime: Util.RuntimeOptions): GetAlarmStatusResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAlarmStatus',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getAlarmStatus(request: GetAlarmStatusRequest): GetAlarmStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAlarmStatusWithOptions(request, runtime);
}

model GetConfigurationSpecificationRequest {
  configurationSpecificationId?: string(name='ConfigurationSpecificationId', example='configurationSpecificationId'),
  instanceId?: string(name='InstanceId', example='instanceId'),
}

model GetConfigurationSpecificationResponseBody = {
  configurationSpecification?: {
    architecture?: string(name='Architecture', example='5.0'),
    configurationSpecificationId?: string(name='ConfigurationSpecificationId', example='configurationSpecificationId'),
    createTime?: string(name='CreateTime', description='代表创建时间的资源属性字段', example='2020-02-01'),
    mode?: string(name='Mode', example='5750'),
    relatedVariate?: [ string ](name='RelatedVariate'),
    role?: string(name='Role', example='ASW'),
    specificationContent?: string(name='SpecificationContent', example='config'),
    specificationName?: string(name='SpecificationName', example='config'),
    updateTime?: string(name='UpdateTime', example='2020-02-01'),
    vendor?: string(name='Vendor', example='HUAWEI'),
  }(name='ConfigurationSpecification'),
  requestId?: string(name='RequestId', example='requestId'),
}

model GetConfigurationSpecificationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetConfigurationSpecificationResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param request GetConfigurationSpecificationRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return GetConfigurationSpecificationResponse
 */
// Deprecated
async function getConfigurationSpecificationWithOptions(request: GetConfigurationSpecificationRequest, runtime: Util.RuntimeOptions): GetConfigurationSpecificationResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetConfigurationSpecification',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request GetConfigurationSpecificationRequest
  * @return GetConfigurationSpecificationResponse
 */
// Deprecated
async function getConfigurationSpecification(request: GetConfigurationSpecificationRequest): GetConfigurationSpecificationResponse {
  var runtime = new Util.RuntimeOptions{};
  return getConfigurationSpecificationWithOptions(request, runtime);
}

model GetConfigurationVariateRequest {
  configurationVariateId?: string(name='ConfigurationVariateId', example='configurationVariateId'),
  instanceId?: string(name='InstanceId', example='instanceId'),
}

model GetConfigurationVariateResponseBody = {
  configurationVariate?: {
    comment?: string(name='Comment', example='项目信息'),
    formatFunction?: string(name='FormatFunction', example='def main():'),
    variateName?: string(name='VariateName', example='变量名字'),
  }(name='ConfigurationVariate'),
  requestId?: string(name='RequestId', example='requestId'),
}

model GetConfigurationVariateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetConfigurationVariateResponseBody(name='body'),
}

async function getConfigurationVariateWithOptions(request: GetConfigurationVariateRequest, runtime: Util.RuntimeOptions): GetConfigurationVariateResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetConfigurationVariate',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getConfigurationVariate(request: GetConfigurationVariateRequest): GetConfigurationVariateResponse {
  var runtime = new Util.RuntimeOptions{};
  return getConfigurationVariateWithOptions(request, runtime);
}

model GetDedicatedLineRequest {
  dedicatedLineId?: string(name='DedicatedLineId', example='space_isp-6dk5xpoyoopr6obf'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxxx'),
}

model GetDedicatedLineResponseBody = {
  dedicatedLine?: {
    bandwidth?: int32(name='Bandwidth', example='100'),
    dedicatedLineGateway?: string(name='DedicatedLineGateway', example='111.111.xxx.xxx'),
    dedicatedLineId?: string(name='DedicatedLineId', example='space_isp-6dk5xpoyoopr6obf'),
    dedicatedLineIp?: string(name='DedicatedLineIp', example='111.111.xxx.xxx'),
    dedicatedLineRole?: string(name='DedicatedLineRole', example='主'),
    description?: string(name='Description'),
    deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
    deviceName?: string(name='DeviceName', example='HZYT_USG6620_A'),
    devicePort?: string(name='DevicePort', example='GigabitEthernet1/0/0'),
    isp?: string(name='Isp', example='电信'),
    physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
  }(name='DedicatedLine'),
  requestId?: string(name='RequestId', example='8de935f6-90c7-444e-a2b4-bb4185153435'),
}

model GetDedicatedLineResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDedicatedLineResponseBody(name='body'),
}

async function getDedicatedLineWithOptions(request: GetDedicatedLineRequest, runtime: Util.RuntimeOptions): GetDedicatedLineResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDedicatedLine',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDedicatedLine(request: GetDedicatedLineRequest): GetDedicatedLineResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDedicatedLineWithOptions(request, runtime);
}

model GetDeviceRequest {
  deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
  instanceId?: string(name='InstanceId', description='实例ID', example='cmn-cn-xxx'),
}

model GetDeviceResponseBody = {
  device?: {
    deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
    deviceFormName?: string(name='DeviceFormName', example='网络设备'),
    deviceId?: string(name='DeviceId', description='设备ID', example='device-evve560juend5owh'),
    enablePassword?: string(name='EnablePassword', description='enable密码', example='123456'),
    extAttributes?: string(name='ExtAttributes', description='设备额外属性(JSON)', example='{"role":"ASW"}'),
    hostName?: string(name='HostName', description='主机名', example='HZYT_USG6620_A'),
    ip?: string(name='Ip', description='设备IP', example='10.17.101.1'),
    loginPassword?: string(name='LoginPassword', description='登录账号', example='123456'),
    loginType?: string(name='LoginType', description='登录类型，SSH或者TELNET', example='SSH,TELNET'),
    loginUsername?: string(name='LoginUsername', description='登录账号', example='admin'),
    mac?: string(name='Mac', description='设备MAC地址', example='b8:27:eb:34:3b:a2'),
    model?: string(name='Model', description='设备型号', example='USG6620'),
    physicalSpaceId?: string(name='PhysicalSpaceId', description='物理空间ID', example='space-ez6zd3w68ma4fsd4'),
    physicalSpaceName?: string(name='PhysicalSpaceName', description='物理空间名称', example='阿里巴巴西溪园区'),
    securityDomain?: string(name='SecurityDomain', description='设备安全域', example='IT'),
    serviceStatus?: string(name='ServiceStatus', description='设备状态', example='online'),
    sn?: string(name='Sn', description='设备SN', example='210235951910K7000016'),
    snmpAccountType?: string(name='SnmpAccountType', description='SNMP 账号类型', example='get'),
    snmpAccountVersion?: string(name='SnmpAccountVersion', description='SNMP版本号', example='v3'),
    snmpAuthPassphrase?: string(name='SnmpAuthPassphrase', description='SNMP Auth PassPhrase', example='123456'),
    snmpAuthProtocol?: string(name='SnmpAuthProtocol', description='SNMP Auth Protocol', example='MD5'),
    snmpCommunity?: string(name='SnmpCommunity', description='SNMP Community', example='123456'),
    snmpPrivacyPassphrase?: string(name='SnmpPrivacyPassphrase', description='SNMP Privacy Passphrase', example='123456'),
    snmpPrivacyProtocol?: string(name='SnmpPrivacyProtocol', description='SNMP Privacy Protocol', example='DES'),
    snmpSecurityLevel?: string(name='SnmpSecurityLevel', description='SNMP 安全级别', example='AUTH_PRIV'),
    snmpUsername?: string(name='SnmpUsername', description='SNMP 用户名', example='admin'),
    vendor?: string(name='Vendor', description='设备厂商', example='Huawei'),
  }(name='Device'),
  requestId?: string(name='RequestId', description='Id of the request', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
}

model GetDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceResponseBody(name='body'),
}

async function getDeviceWithOptions(request: GetDeviceRequest, runtime: Util.RuntimeOptions): GetDeviceResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDevice',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDevice(request: GetDeviceRequest): GetDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceWithOptions(request, runtime);
}

model GetDeviceConfigRequest {
  date?: string(name='Date', example='2021-01-01'),
  deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
  instanceId?: string(name='InstanceId', description='实例ID', example='cmn-cn-xxx'),
}

model GetDeviceConfigResponseBody = {
  deviceConfig?: string(name='DeviceConfig', description='设备配置内容', example='hostname 	HZYT_USG6620_A'),
  requestId?: string(name='RequestId', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
}

model GetDeviceConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceConfigResponseBody(name='body'),
}

async function getDeviceConfigWithOptions(request: GetDeviceConfigRequest, runtime: Util.RuntimeOptions): GetDeviceConfigResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceConfig',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceConfig(request: GetDeviceConfigRequest): GetDeviceConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceConfigWithOptions(request, runtime);
}

model GetDeviceConfigDateRequest {
  deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
  instanceId?: string(name='InstanceId'),
}

model GetDeviceConfigDateResponseBody = {
  deviceConfigDate?: [ string ](name='DeviceConfigDate', description='设备配置内容'),
  requestId?: string(name='RequestId', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
}

model GetDeviceConfigDateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceConfigDateResponseBody(name='body'),
}

async function getDeviceConfigDateWithOptions(request: GetDeviceConfigDateRequest, runtime: Util.RuntimeOptions): GetDeviceConfigDateResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceConfigDate',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceConfigDate(request: GetDeviceConfigDateRequest): GetDeviceConfigDateResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceConfigDateWithOptions(request, runtime);
}

model GetDeviceConfigDiffRequest {
  deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
  endDate?: string(name='EndDate', example='2021-01-02'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  startDate?: string(name='StartDate', example='2021-01-01'),
}

model GetDeviceConfigDiffResponseBody = {
  deviceConfigDiff?: {
    extractDiff?: string(name='ExtractDiff', example='--- 2021-01-01 / 2021-01-02 差异提取 +++ 2021-01-01 / 2021-01-02 差异提取 @@ -1,1 +1,1 @@ -hostname HZYT_USG6620_A +hostname HZYT_USG6620_B'),
    totalDiff?: string(name='TotalDiff', example='--- 2021-01-01 / 2021-01-02 全量比对 +++ 2021-01-01 / 2021-01-02 全量比对 @@ -1,1 +1,1 @@ -hostname HZYT_USG6620_A +hostname HZYT_USG6620_B'),
  }(name='DeviceConfigDiff'),
  requestId?: string(name='RequestId', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
}

model GetDeviceConfigDiffResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceConfigDiffResponseBody(name='body'),
}

async function getDeviceConfigDiffWithOptions(request: GetDeviceConfigDiffRequest, runtime: Util.RuntimeOptions): GetDeviceConfigDiffResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceConfigDiff',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceConfigDiff(request: GetDeviceConfigDiffRequest): GetDeviceConfigDiffResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceConfigDiffWithOptions(request, runtime);
}

model GetDeviceFormRequest {
  deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
}

model GetDeviceFormResponseBody = {
  deviceForm?: {
    accountConfig?: boolean(name='AccountConfig', description='是否需要账号配置', example='true'),
    attributeList?: [ 
      {
        attributeBuiltIn?: boolean(name='AttributeBuiltIn', description='内置属性不可修改和删除', example='true'),
        attributeFormat?: string(name='AttributeFormat', description='设备形态属性值格式', example='STRING'),
        attributeFuzzyQuery?: boolean(name='AttributeFuzzyQuery', description='前端查询控件是否支持模糊搜索', example='false'),
        attributeKey?: string(name='AttributeKey', description='设备形态属性主键', example='serviceStatus'),
        attributeName?: string(name='AttributeName', description='设备形态属性名称', example='服务状态'),
        attributePlaceholder?: string(name='AttributePlaceholder', description='前端查询控件占位符', example='前端占位符说明'),
        attributeQuery?: boolean(name='AttributeQuery', description='前端是否展示对应的查询控件', example='false'),
        attributeReference?: string(name='AttributeReference', description='设备形态属性关联对象', example='status'),
        attributeRequirement?: boolean(name='AttributeRequirement', description='设备形态属性是否必填', example='true'),
        attributeSequence?: int32(name='AttributeSequence', example='1'),
        attributeTableDisplay?: boolean(name='AttributeTableDisplay', description='设备形态属性是否表格可见', example='true'),
        attributeType?: string(name='AttributeType', description='设备形态属性值类型', example='ENUMS'),
        attributeUniqueness?: boolean(name='AttributeUniqueness', description='设备形态属性是否唯一', example='false'),
      }
    ](name='AttributeList', description='设备形态属性列表'),
    configCompare?: boolean(name='ConfigCompare', description='是否支持配置生成', example='true'),
    detailDisplay?: boolean(name='DetailDisplay', example='true'),
    deviceFormId?: string(name='DeviceFormId', description='设备形态ID', example='form-u4ilnhu64h026lrf'),
    deviceFormName?: string(name='DeviceFormName', description='设备形态名称', example='网络设备'),
    formBuiltIn?: boolean(name='FormBuiltIn', description='内置形态不可修改和删除', example='true'),
    resourceUse?: string(name='ResourceUse', example='DEV_OPS'),
    script?: string(name='Script', example='@login_device\\r\\ndef config_backup():\\r\\n    exec_cli(\\"config\\", strict=False, timeout=120)\\r\\n    return exec_cli(\\"show configuration interface ethernet0/1\\", timeout=180)'),
    uniqueKey?: string(name='UniqueKey', example='SN'),
  }(name='DeviceForm'),
  requestId?: string(name='RequestId', example='6d439436-ddde-4f26-aaf6-0470099b5c35'),
}

model GetDeviceFormResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceFormResponseBody(name='body'),
}

async function getDeviceFormWithOptions(request: GetDeviceFormRequest, runtime: Util.RuntimeOptions): GetDeviceFormResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceForm',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceForm(request: GetDeviceFormRequest): GetDeviceFormResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceFormWithOptions(request, runtime);
}

model GetDeviceOpLogRequest {
  deviceId?: string(name='DeviceId', example='device-s77qblesbyyef845'),
  instanceId?: string(name='InstanceId'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
}

model GetDeviceOpLogResponseBody = {
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='10'),
  operationLogs?: [ 
    {
      deviceId?: string(name='DeviceId', description='设备ID'),
      gmtModifiedTime?: string(name='GmtModifiedTime'),
      keyword?: string(name='Keyword', description='SNMP Privacy Protocol', example='role'),
      newValue?: string(name='NewValue', example='FW'),
      oldValue?: string(name='OldValue', description='设备额外属性(JSON)', example='ASW'),
      operator?: string(name='Operator', description='SNMP Privacy Passphrase', example='UpdateDevice'),
    }
  ](name='OperationLogs'),
  requestId?: string(name='RequestId', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model GetDeviceOpLogResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceOpLogResponseBody(name='body'),
}

async function getDeviceOpLogWithOptions(request: GetDeviceOpLogRequest, runtime: Util.RuntimeOptions): GetDeviceOpLogResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceOpLog',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceOpLog(request: GetDeviceOpLogRequest): GetDeviceOpLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceOpLogWithOptions(request, runtime);
}

model GetDevicePropertyRequest {
  deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
  devicePropertyId?: string(name='DevicePropertyId', example='property-z50wex75a1lkx7vx'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  propertyKey?: string(name='PropertyKey', example='device_model'),
}

model GetDevicePropertyResponseBody = {
  deviceProperty?: {
    builtIn?: boolean(name='BuiltIn', example='true'),
    deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
    deviceFormName?: string(name='DeviceFormName', example='网络设备'),
    devicePropertyId?: string(name='DevicePropertyId', example='property-z50wex75a1lkx7vx'),
    propertyContent?: string(name='PropertyContent', example='{   "H3C": [     "H3C S6800",     "S6850-56HF"   ],   "Huawei": [     "CE6851-48S6Q"   ] }'),
    propertyFormat?: string(name='PropertyFormat', example='JSON'),
    propertyKey?: string(name='PropertyKey', example='device_model'),
    propertyName?: string(name='PropertyName', example='厂商型号'),
  }(name='DeviceProperty'),
  requestId?: string(name='RequestId', example='1f598491-db6d-4276-a83a-3b5f57d4a4e1'),
}

model GetDevicePropertyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDevicePropertyResponseBody(name='body'),
}

async function getDevicePropertyWithOptions(request: GetDevicePropertyRequest, runtime: Util.RuntimeOptions): GetDevicePropertyResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceProperty',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceProperty(request: GetDevicePropertyRequest): GetDevicePropertyResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDevicePropertyWithOptions(request, runtime);
}

model GetDeviceResourceRequest {
  deviceResourceId?: string(name='DeviceResourceId', example='deviceResourceId'),
  instanceId?: string(name='InstanceId', example='instanceId'),
}

model GetDeviceResourceResponseBody = {
  deviceResource?: {
    blockNumber?: string(name='BlockNumber'),
    business?: string(name='Business', example='{}'),
    config?: string(name='Config'),
    configTaskStatus?: string(name='ConfigTaskStatus', example='UNDO, RUNNING, SUCCESS, FAILURE'),
    deliveryIp?: string(name='DeliveryIp', example='192.168.1.1'),
    deviceNum?: string(name='DeviceNum', example='ConfigurationSpecificationName'),
    deviceResourceId?: string(name='DeviceResourceId'),
    generateConfig?: string(name='GenerateConfig', example='true'),
    hostName?: string(name='HostName', example='DSW-xxxyyy'),
    interConnection?: string(name='InterConnection', example='{}'),
    location?: string(name='Location', example='杭州-EFC'),
    loopback?: string(name='Loopback', example='{}'),
    managerIp?: string(name='ManagerIp', example='11.12.13.54'),
    model?: string(name='Model', example='5566'),
    role?: string(name='Role'),
    setupProjectId?: string(name='SetupProjectId', description='建设项目id', example='xxx_zzz'),
    sn?: string(name='Sn', example='123'),
    stack?: boolean(name='Stack', example='false'),
    vendor?: string(name='Vendor', example='Ruijie'),
  }(name='DeviceResource', example='ConfigurationSpecificationName'),
  requestId?: string(name='RequestId', example='requestId'),
}

model GetDeviceResourceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceResourceResponseBody(name='body'),
}

async function getDeviceResourceWithOptions(request: GetDeviceResourceRequest, runtime: Util.RuntimeOptions): GetDeviceResourceResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceResource',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceResource(request: GetDeviceResourceRequest): GetDeviceResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceResourceWithOptions(request, runtime);
}

model GetInspectionTaskRequest {
  deviceId?: string(name='DeviceId', example='device-ak0rnxtulk******'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  itemName?: string(name='ItemName', example='config_backup'),
  taskId?: string(name='TaskId', example='Task-sdaldsd-3r-4234'),
}

model GetInspectionTaskResponseBody = {
  inspectionTask?: {
    deviceDisplay?: string(name='DeviceDisplay', example='device output sample'),
    deviceId?: string(name='DeviceId', example='device-ak0rnxtulk******'),
    errorCode?: string(name='ErrorCode', example='AGENT_LOGIN_FAIL'),
    executionBeginTime?: string(name='ExecutionBeginTime', example='2020-12-23 03:18:22'),
    executionEndTime?: string(name='ExecutionEndTime', example='2020-12-23 03:18:22'),
    hostName?: string(name='HostName', example='ASW-S-3F1-1.CD1'),
    IP?: string(name='IP', example='127.0.0.1'),
    inspectionAlarmRules?: [ 
      {
        actualValue?: string(name='ActualValue', example='11'),
        expression?: string(name='Expression', example='>'),
        level?: string(name='Level', example='WARNING'),
        operator?: string(name='Operator', example='A'),
        value?: string(name='Value', example='10'),
      }
    ](name='InspectionAlarmRules'),
    inspectionResult?: string(name='InspectionResult', example='{}'),
    itemId?: string(name='ItemId', example='INSPECTION_ITEM-sjds-23'),
    itemName?: string(name='ItemName', example='config_backup'),
    model?: [ string ](name='Model', example='F101'),
    scriptId?: string(name='ScriptId', example='INSPECTION_TEMPLATE-sdsld'),
    space?: string(name='Space', example='XX门店'),
    taskId?: string(name='TaskId', example='TASK-skd-32-sd'),
    taskStatus?: string(name='TaskStatus', example='SUCCESS'),
    vendor?: string(name='Vendor', example='Alibaba'),
  }(name='InspectionTask'),
  requestId?: string(name='RequestId', example='AC8F05E6-AFBB-4ABE-B75E-A6539A9BAAA8'),
}

model GetInspectionTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetInspectionTaskResponseBody(name='body'),
}

async function getInspectionTaskWithOptions(request: GetInspectionTaskRequest, runtime: Util.RuntimeOptions): GetInspectionTaskResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetInspectionTask',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getInspectionTask(request: GetInspectionTaskRequest): GetInspectionTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return getInspectionTaskWithOptions(request, runtime);
}

model GetMonitorItemRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  monitorItemId?: string(name='MonitorItemId', example='m-598zb0r9z3f44cfr'),
}

model GetMonitorItemResponseBody = {
  monitorItem?: {
    alarmRuleList?: [ 
      {
        alarmStatus?: string(name='AlarmStatus', example='CRITICAL'),
        expression?: string(name='Expression', example='>='),
        value?: string(name='Value', example='10'),
        variable?: string(name='Variable', example='loss_rate'),
      }
    ](name='AlarmRuleList'),
    analysisCode?: string(name='AnalysisCode', example='/**\\n** Parsing logic\\n** @param: output :Collect raw data\\n**/\\nfunction parse(output){\\n    var results = {}'),
    collectionType?: string(name='CollectionType', example='PING'),
    config?: string(name='Config', example='{\\"Interval\\":1000,\\"PackNum\\":30}'),
    createTime?: string(name='CreateTime', example='2023-06-22 02:37:19'),
    dataItem?: string(name='DataItem', example='avg_latency'),
    deviceForm?: string(name='DeviceForm'),
    effective?: int32(name='Effective', example='1'),
    execInterval?: int32(name='ExecInterval', example='60'),
    monitorItemDescription?: string(name='MonitorItemDescription'),
    monitorItemId?: string(name='MonitorItemId', example='m-598zb0r9z3f44cfr'),
    monitorItemName?: string(name='MonitorItemName'),
    personalizedAlarmRuleList?: [ 
      {
        alarmStatus?: string(name='AlarmStatus', example='CRITICAL'),
        expression?: string(name='Expression', example='>='),
        fieldName?: string(name='FieldName', example='role'),
        fieldValue?: string(name='FieldValue', example='ASW'),
        value?: string(name='Value', example='20'),
        variable?: string(name='Variable', example='loss_rate'),
      }
    ](name='PersonalizedAlarmRuleList'),
    securityDomain?: string(name='SecurityDomain', example='*'),
    type?: string(name='Type', example='SINGLE'),
    updateTime?: string(name='UpdateTime', example='2023-06-22 02:37:19'),
  }(name='MonitorItem'),
  requestId?: string(name='RequestId', description='Id of the request', example='94EDA8CB-57C7-57F6-9193-26E701348ADB'),
}

model GetMonitorItemResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetMonitorItemResponseBody(name='body'),
}

async function getMonitorItemWithOptions(request: GetMonitorItemRequest, runtime: Util.RuntimeOptions): GetMonitorItemResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetMonitorItem',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getMonitorItem(request: GetMonitorItemRequest): GetMonitorItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMonitorItemWithOptions(request, runtime);
}

model GetOsDownloadPathRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  osVersionId?: string(name='OsVersionId', example='xxxyyy'),
}

model GetOsDownloadPathResponseBody = {
  osVersion?: {
    downloadPath?: string(name='DownloadPath', example='htts://xxxkkk'),
  }(name='OsVersion'),
  requestId?: string(name='RequestId', description='Id of the request', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
}

model GetOsDownloadPathResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetOsDownloadPathResponseBody(name='body'),
}

async function getOsDownloadPathWithOptions(request: GetOsDownloadPathRequest, runtime: Util.RuntimeOptions): GetOsDownloadPathResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetOsDownloadPath',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getOsDownloadPath(request: GetOsDownloadPathRequest): GetOsDownloadPathResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOsDownloadPathWithOptions(request, runtime);
}

model GetOsVersionRequest {
  instanceId?: string(name='InstanceId'),
  osVersionId?: string(name='OsVersionId'),
}

model GetOsVersionResponseBody = {
  osVersion?: [ 
    {
      downloadPath?: string(name='DownloadPath', description='系统版本', example='http//:ikkk'),
    }
  ](name='OsVersion'),
  requestId?: string(name='RequestId', example='requestId'),
}

model GetOsVersionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetOsVersionResponseBody(name='body'),
}

async function getOsVersionWithOptions(request: GetOsVersionRequest, runtime: Util.RuntimeOptions): GetOsVersionResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetOsVersion',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getOsVersion(request: GetOsVersionRequest): GetOsVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOsVersionWithOptions(request, runtime);
}

model GetOssPolicyRequest {
  instanceId?: string(name='InstanceId'),
  name?: string(name='Name', example='1674131/build.txt'),
}

model GetOssPolicyResponseBody = {
  ossPolicy?: {
    accessId?: string(name='AccessId', description='通行id', example='fasd44sdf'),
    directory?: string(name='Directory', description='目录', example='/xxx/zzz'),
    expireTime?: string(name='ExpireTime', description='过期时间', example='120'),
    host?: string(name='Host', description='主机名', example='https://zzzxxx'),
    policy?: string(name='Policy', description='通行规则', example='gagfaf54we5'),
    signature?: string(name='Signature', description='签名', example='dfagweyghsfsa'),
  }(name='OssPolicy', description='资源上传规则'),
  requestId?: string(name='RequestId'),
}

model GetOssPolicyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetOssPolicyResponseBody(name='body'),
}

async function getOssPolicyWithOptions(request: GetOssPolicyRequest, runtime: Util.RuntimeOptions): GetOssPolicyResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetOssPolicy',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getOssPolicy(request: GetOssPolicyRequest): GetOssPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOssPolicyWithOptions(request, runtime);
}

model GetPhysicalSpaceRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
}

model GetPhysicalSpaceResponseBody = {
  physicalSpace?: {
    address?: string(name='Address', example='文一西路969号'),
    city?: string(name='City', example='杭州市'),
    country?: string(name='Country', example='中国'),
    owner?: string(name='Owner', example='张三'),
    physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
    physicalSpaceName?: string(name='PhysicalSpaceName', example='阿里巴巴西溪园区'),
    province?: string(name='Province', example='浙江省'),
    remark?: string(name='Remark'),
    securityDomainList?: [ string ](name='SecurityDomainList'),
    spaceAbbreviation?: string(name='SpaceAbbreviation', example='yq'),
    spaceType?: string(name='SpaceType', example='园区'),
  }(name='PhysicalSpace'),
  requestId?: string(name='RequestId', example='a1c7e2b4-174e-4557-a96d-d4cbf83988a6'),
}

model GetPhysicalSpaceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetPhysicalSpaceResponseBody(name='body'),
}

async function getPhysicalSpaceWithOptions(request: GetPhysicalSpaceRequest, runtime: Util.RuntimeOptions): GetPhysicalSpaceResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetPhysicalSpace',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getPhysicalSpace(request: GetPhysicalSpaceRequest): GetPhysicalSpaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPhysicalSpaceWithOptions(request, runtime);
}

model GetPhysicalSpaceTopoRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
  topoType?: string(name='TopoType', example='lldp'),
}

model GetPhysicalSpaceTopoResponseBody = {
  requestId?: string(name='RequestId', example='F6EC6EAF-8C8F-5D72-BE74-FD03A1123450'),
  topoData?: {
    devices?: [ 
      {
        deviceId?: string(name='DeviceId', example='device-9i8867jzljw12345'),
        deviceRole?: string(name='DeviceRole', example='ASW'),
        hostName?: string(name='HostName', example='TEST-xxxx3'),
        ip?: string(name='Ip', example='127.0.xxx.xxx'),
      }
    ](name='Devices'),
    links?: [ 
      {
        sourceDeviceId?: string(name='SourceDeviceId', example='device-gbutctzxtuu7t122'),
        sourceDeviceName?: string(name='SourceDeviceName', example='TEST-xxxx1'),
        sourcePort?: string(name='SourcePort', example='GE2/3/0/1'),
        targetDeviceId?: string(name='TargetDeviceId', example='device-i2g2iaiao5ja12345'),
        targetDeviceName?: string(name='TargetDeviceName', example='TEST-xxxx2'),
        targetPort?: string(name='TargetPort', example='TE1/0/28'),
      }
    ](name='Links'),
    updateTime?: string(name='UpdateTime', example='2023-02-01 22:24:16'),
  }(name='TopoData'),
}

model GetPhysicalSpaceTopoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetPhysicalSpaceTopoResponseBody(name='body'),
}

async function getPhysicalSpaceTopoWithOptions(request: GetPhysicalSpaceTopoRequest, runtime: Util.RuntimeOptions): GetPhysicalSpaceTopoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.physicalSpaceId)) {
    query['PhysicalSpaceId'] = request.physicalSpaceId;
  }
  if (!Util.isUnset(request.topoType)) {
    query['TopoType'] = request.topoType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetPhysicalSpaceTopo',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getPhysicalSpaceTopo(request: GetPhysicalSpaceTopoRequest): GetPhysicalSpaceTopoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPhysicalSpaceTopoWithOptions(request, runtime);
}

model GetRealtimeTaskRequest {
  instanceId?: string(name='InstanceId', description='实例ID', example='cmn-cn-xxx'),
  taskId?: string(name='TaskId', example='TASK0489b577-33b3-4991-bdc5-1cdabc1a82e2'),
}

model GetRealtimeTaskResponseBody = {
  inspectionTask?: {
    errorCode?: string(name='ErrorCode', example='CONTROLLER_ERROR'),
    inspectionMessage?: string(name='InspectionMessage', example='error: No avaliable agents!, trace:'),
    inspectionResult?: string(name='InspectionResult', example='{}'),
    taskStatus?: string(name='TaskStatus', example='SUCCESS'),
  }(name='InspectionTask'),
  requestId?: string(name='RequestId', example='AC8F05E6-AFBB-4ABE-B75E-A6539A9BAAA8'),
}

model GetRealtimeTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetRealtimeTaskResponseBody(name='body'),
}

async function getRealtimeTaskWithOptions(request: GetRealtimeTaskRequest, runtime: Util.RuntimeOptions): GetRealtimeTaskResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetRealtimeTask',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getRealtimeTask(request: GetRealtimeTaskRequest): GetRealtimeTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return getRealtimeTaskWithOptions(request, runtime);
}

model GetScheduleWorkerRequest {
  instanceId?: string(name='InstanceId'),
  scheduleWorkerId?: string(name='ScheduleWorkerId'),
}

model GetScheduleWorkerResponseBody = {
  requestId?: string(name='RequestId'),
  scheduleWorker?: {
    createTime?: string(name='CreateTime', description='代表创建时间的资源属性字段', example='2020-12-22 10:39:17'),
    scheduleWorkerId?: string(name='ScheduleWorkerId', description='代表资源一级ID的资源属性字段'),
    updateTime?: string(name='UpdateTime', description='更新时间', example='2020-12-22 10:39:17'),
    workerContact?: string(name='WorkerContact'),
    workerId?: string(name='WorkerId', description='值班人员工号', example='1234567'),
    workerName?: string(name='WorkerName', description='值班人员姓名', example='张三'),
  }(name='ScheduleWorker'),
}

model GetScheduleWorkerResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetScheduleWorkerResponseBody(name='body'),
}

async function getScheduleWorkerWithOptions(request: GetScheduleWorkerRequest, runtime: Util.RuntimeOptions): GetScheduleWorkerResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetScheduleWorker',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getScheduleWorker(request: GetScheduleWorkerRequest): GetScheduleWorkerResponse {
  var runtime = new Util.RuntimeOptions{};
  return getScheduleWorkerWithOptions(request, runtime);
}

model GetSetupProjectRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  setupProjectId?: string(name='SetupProjectId', example='setupProjectId'),
}

model GetSetupProjectResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
  setupProject?: {
    createTime?: string(name='CreateTime', description='代表创建时间的资源属性字段', example='2020-02-01'),
    deliveryTime?: string(name='DeliveryTime', description='预计交付时间', example='2021-03-27 00:00:00'),
    nodes?: string(name='Nodes', description='节点', example='[]'),
    packages?: [ 
      {
        deviceNumber?: string(name='DeviceNumber', description='设备号', example='1'),
        model?: string(name='Model', description='型号', example='6510'),
        role?: string(name='Role', description='角色', example='DSW'),
        vendor?: string(name='Vendor', description='厂商', example='Ruijie'),
      }
    ](name='Packages', description='套餐'),
    progress?: string(name='Progress', example='build'),
    setupProjectId?: string(name='SetupProjectId', description='代表资源一级ID的资源属性字段', example='xxxyyy'),
    spaceId?: string(name='SpaceId', description='物理空间uId', example='xxxyyy'),
    spaceName?: string(name='SpaceName', example='WHHM'),
    spaceType?: string(name='SpaceType', example='园区'),
  }(name='SetupProject'),
}

model GetSetupProjectResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetSetupProjectResponseBody(name='body'),
}

async function getSetupProjectWithOptions(request: GetSetupProjectRequest, runtime: Util.RuntimeOptions): GetSetupProjectResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetSetupProject',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getSetupProject(request: GetSetupProjectRequest): GetSetupProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSetupProjectWithOptions(request, runtime);
}

model GetSpaceModelRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  spaceModelId?: string(name='SpaceModelId', example='spaceModelId'),
}

model GetSpaceModelResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
  spaceModel?: {
    createTime?: string(name='CreateTime', description='创建时间', example='2020-12-22 10:39:17'),
    sort?: [ 
      {
        level?: long(name='Level', example='1'),
        levelName?: string(name='LevelName', example='园区'),
      }
    ](name='Sort', description='模型实例', example='{}'),
    spaceModelId?: string(name='SpaceModelId', description='物理空间模型id', example='xxx_yyy'),
    spaceType?: string(name='SpaceType', description='物理空间类型', example='园区'),
    status?: string(name='Status', description='模型状态', example='LOCK'),
    updateTime?: string(name='UpdateTime', description='更新时间', example='2020-12-22 10:39:17'),
  }(name='SpaceModel', description='物理空间模型'),
}

model GetSpaceModelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetSpaceModelResponseBody(name='body'),
}

async function getSpaceModelWithOptions(request: GetSpaceModelRequest, runtime: Util.RuntimeOptions): GetSpaceModelResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetSpaceModel',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getSpaceModel(request: GetSpaceModelRequest): GetSpaceModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSpaceModelWithOptions(request, runtime);
}

model GetSpaceModelInstanceRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  operateType?: string(name='OperateType', example='CMDB、SETUP'),
  spaceId?: string(name='SpaceId', example='spaceIdxxxyyy'),
  spaceType?: string(name='SpaceType', example='园区'),
}

model GetSpaceModelInstanceResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
  spaceModel?: {
    instance?: string(name='Instance', example='{}'),
  }(name='SpaceModel'),
}

model GetSpaceModelInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetSpaceModelInstanceResponseBody(name='body'),
}

async function getSpaceModelInstanceWithOptions(request: GetSpaceModelInstanceRequest, runtime: Util.RuntimeOptions): GetSpaceModelInstanceResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetSpaceModelInstance',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getSpaceModelInstance(request: GetSpaceModelInstanceRequest): GetSpaceModelInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSpaceModelInstanceWithOptions(request, runtime);
}

model GetSpaceModelSortRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  operateType?: string(name='OperateType', example='CMDB、SETUP'),
  spaceType?: string(name='SpaceType', example='园区'),
}

model GetSpaceModelSortResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
  spaceModel?: [ 
    {
      level?: long(name='Level'),
      levelName?: string(name='LevelName'),
    }
  ](name='SpaceModel', example='{}'),
}

model GetSpaceModelSortResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetSpaceModelSortResponseBody(name='body'),
}

async function getSpaceModelSortWithOptions(request: GetSpaceModelSortRequest, runtime: Util.RuntimeOptions): GetSpaceModelSortResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetSpaceModelSort',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getSpaceModelSort(request: GetSpaceModelSortRequest): GetSpaceModelSortResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSpaceModelSortWithOptions(request, runtime);
}

model GetTaskRequest {
  instanceId?: string(name='InstanceId'),
  taskId?: string(name='TaskId'),
}

model GetTaskResponseBody = {
  requestId?: string(name='RequestId'),
  task?: {
    category?: string(name='Category'),
    createTime?: string(name='CreateTime'),
    params?: string(name='Params'),
    responseCode?: string(name='ResponseCode'),
    result?: string(name='Result'),
    status?: string(name='Status'),
    taskId?: string(name='TaskId'),
    templateId?: string(name='TemplateId'),
    templateName?: string(name='TemplateName'),
    updateTime?: string(name='UpdateTime'),
  }(name='Task'),
}

model GetTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetTaskResponseBody(name='body'),
}

async function getTaskWithOptions(request: GetTaskRequest, runtime: Util.RuntimeOptions): GetTaskResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetTask',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getTask(request: GetTaskRequest): GetTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTaskWithOptions(request, runtime);
}

model ListAlarmStatusRequest {
  aggregateDataName?: string(name='AggregateDataName', example='聚合数据名称'),
  city?: string(name='City', example='杭州市'),
  country?: string(name='Country', example='中国'),
  dedicatedLineId?: string(name='DedicatedLineId', example='space-isp_knbghjkl09u'),
  dedicatedLineName?: string(name='DedicatedLineName', example='专线名称'),
  deviceForm?: string(name='DeviceForm', example='网络设备'),
  deviceId?: string(name='DeviceId', example='device-jrjb476ub06'),
  domain?: string(name='Domain', example='www.example.com'),
  hostName?: string(name='HostName', example='asw-1'),
  instanceId?: string(name='InstanceId', example='cmn-cn-13edefd2'),
  manufacturer?: string(name='Manufacturer', example='H3C'),
  maxResults?: int32(name='MaxResults', example='10'),
  model?: string(name='Model', example='5800'),
  monitorItemId?: string(name='MonitorItemId', example='m-22ut5sn54o35wsz6'),
  nextToken?: string(name='NextToken', example='10'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-123wefv243'),
  portCollectionId?: string(name='PortCollectionId', example='p-08uhbnlo9ygbn'),
  portCollectionName?: string(name='PortCollectionName', example='端口集名称'),
  province?: string(name='Province', example='浙江省'),
  region?: string(name='Region', example='Northeast China'),
  role?: string(name='Role', example='ASW'),
  securityDomain?: string(name='SecurityDomain', example='CMN-A01'),
  serviceStatus?: string(name='ServiceStatus', example='online'),
  space?: string(name='Space', example='银泰武林店'),
  spaceType?: string(name='SpaceType', example='园区'),
  status?: string(name='Status', example='WARNING'),
  type?: string(name='Type', example='SINGLE'),
  uniqueKey?: string(name='UniqueKey', example='a-iuhb098uyhbvgh'),
}

model ListAlarmStatusResponseBody = {
  alarmStatus?: [ 
    {
      abnormalDataItem?: string(name='AbnormalDataItem', example='[{"avg_latency":4.51}]'),
      agentIp?: string(name='AgentIp', example='127.0.0.1'),
      aggregateData?: {
        aggregateDataName?: string(name='AggregateDataName', example='avg_latency_avg'),
        dataItem?: string(name='DataItem', example='avg_latency'),
      }(name='AggregateData'),
      aggregateDataId?: string(name='AggregateDataId', example='a-52gmqniln3u53n32'),
      alarmRule?: string(name='AlarmRule', example='{"alarmStatus":"WARNING","expression":">=","variable":"avg-latency","monitorItemId":"m-52gmqniln3u53n32","type":"SINGLE","value":"0"}'),
      alarmStatus?: string(name='AlarmStatus', example='WARNING'),
      appId?: string(name='AppId', example='app-0ijhb6yujk'),
      collectionTime?: string(name='CollectionTime', example='2021-01-01 00:01:00'),
      dedicatedLine?: {
        dedicatedLineName?: string(name='DedicatedLineName', example='银泰武林店_电信'),
        physicalSpace?: string(name='PhysicalSpace'),
      }(name='DedicatedLine'),
      dedicatedLineId?: string(name='DedicatedLineId', example='d-52gmqniln3u53n32'),
      deviceId?: string(name='DeviceId', example='device-jrjb476ub06'),
      firstAbnormalTime?: string(name='FirstAbnormalTime', example='2021-01-01 00:01:00'),
      monitorItem?: {
        collectionType?: string(name='CollectionType', example='SNMP'),
        monitorItemDescription?: string(name='MonitorItemDescription', example='ping monitor'),
        monitorItemName?: string(name='MonitorItemName', example='Ping_Monitor'),
      }(name='MonitorItem'),
      monitorItemId?: string(name='MonitorItemId', example='m-22ut5sn54o35wsz6'),
      notificationSwitch?: {
        expiryTime?: string(name='ExpiryTime', example='2021-01-01 00:01:00'),
        reason?: string(name='Reason', example='Temporarily Closed'),
      }(name='NotificationSwitch'),
      portCollection?: {
        portCollectionName?: string(name='PortCollectionName', example='端口集名称'),
      }(name='PortCollection'),
      portCollectionId?: string(name='PortCollectionId', example='p-09iuhbv456yj'),
      receiveTime?: string(name='ReceiveTime', example='2021-01-01 00:01:00'),
      resourceApp?: {
        appId?: string(name='AppId', example='app-0ijhb6yujk'),
        domain?: string(name='Domain', example='www.example.com'),
        port?: string(name='Port', example='3306'),
        securityDomain?: string(name='SecurityDomain', example='CMN-A01'),
        type?: string(name='Type', example='HTTP'),
      }(name='ResourceApp'),
      resourceDevice?: {
        city?: string(name='City', example='杭州'),
        deviceForm?: string(name='DeviceForm', example='网络设备'),
        hostName?: string(name='HostName', example='CSW-HZ3.YT'),
        physicalSpace?: string(name='PhysicalSpace'),
      }(name='ResourceDevice'),
      responseCode?: string(name='ResponseCode', example='OK'),
      result?: string(name='Result', example='{"loss_rate":"0","avg-latency":"4.51"}'),
      uniqueKey?: string(name='UniqueKey', example='d-fwq29cmatva28_m-52gmqniln3u53n32'),
    }
  ](name='AlarmStatus'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='10'),
  requestId?: string(name='RequestId', example='AC8F05E6-AFBB-4AAE-B75E-A6539A9BAAA8'),
  statistics?: [ 
    {
      count?: long(name='Count', example='10'),
      status?: string(name='Status', example='WARNING'),
    }
  ](name='Statistics'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListAlarmStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAlarmStatusResponseBody(name='body'),
}

async function listAlarmStatusWithOptions(request: ListAlarmStatusRequest, runtime: Util.RuntimeOptions): ListAlarmStatusResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAlarmStatus',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAlarmStatus(request: ListAlarmStatusRequest): ListAlarmStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAlarmStatusWithOptions(request, runtime);
}

model ListAlarmStatusHistoriesRequest {
  aggregateDataId?: string(name='AggregateDataId', example='a-cjqd1crux50udtt0'),
  appId?: string(name='AppId', example='app-fwq29cmatva28'),
  dedicatedLineId?: string(name='DedicatedLineId', example='d-fwq29cmatva28'),
  deviceId?: string(name='DeviceId', example='d-fwq29cmatva28'),
  end?: long(name='End', example='1609431000'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  monitorItemId?: string(name='MonitorItemId', example='m-52gmqniln3u53n32'),
  portCollectionId?: string(name='PortCollectionId', example='p-fwq29cmatva28'),
  start?: long(name='Start', example='1609430400'),
  type?: string(name='Type', example='SINGLE'),
}

model ListAlarmStatusHistoriesResponseBody = {
  alarmStatusHistories?: [ 
    {
      timestamp?: long(name='Timestamp', example='1609430460000'),
      value?: string(name='Value', example='1'),
    }
  ](name='AlarmStatusHistories'),
  requestId?: string(name='RequestId', example='15292160-382F-46F2-B241-95EFB54BA434'),
}

model ListAlarmStatusHistoriesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAlarmStatusHistoriesResponseBody(name='body'),
}

async function listAlarmStatusHistoriesWithOptions(request: ListAlarmStatusHistoriesRequest, runtime: Util.RuntimeOptions): ListAlarmStatusHistoriesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAlarmStatusHistories',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAlarmStatusHistories(request: ListAlarmStatusHistoriesRequest): ListAlarmStatusHistoriesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAlarmStatusHistoriesWithOptions(request, runtime);
}

model ListAlarmStatusStatisticsRequest {
  alarmStatus?: string(name='AlarmStatus', example='WARNING'),
  instanceId?: string(name='InstanceId', example='cmn-cn-2dfcv9v1e3'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-1dcfv0193efc'),
  securityDomain?: string(name='SecurityDomain', example='CMN-TEST'),
  type?: string(name='Type', example='SINGLE'),
}

model ListAlarmStatusStatisticsResponseBody = {
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  requestId?: string(name='RequestId'),
  statistics?: [ 
    {
      count?: long(name='Count', example='10'),
      name?: string(name='Name', example='xx物理空间'),
      resourceId?: string(name='ResourceId', example='space-1dcfv0193efc'),
    }
  ](name='Statistics'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model ListAlarmStatusStatisticsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAlarmStatusStatisticsResponseBody(name='body'),
}

async function listAlarmStatusStatisticsWithOptions(request: ListAlarmStatusStatisticsRequest, runtime: Util.RuntimeOptions): ListAlarmStatusStatisticsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAlarmStatusStatistics',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAlarmStatusStatistics(request: ListAlarmStatusStatisticsRequest): ListAlarmStatusStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAlarmStatusStatisticsWithOptions(request, runtime);
}

model ListArchitectureAttributeRequest {
  architectureId?: string(name='ArchitectureId', example='1e0rlfc3358e8h8f'),
  instanceId?: string(name='InstanceId'),
  role?: string(name='Role', example='ASW'),
  vendor?: string(name='Vendor', example='Ruijie'),
}

model ListArchitectureAttributeResponseBody = {
  architecture?: [ 
    {
      model?: [ string ](name='Model'),
      role?: [ string ](name='Role', example='ASW'),
      vendor?: [ string ](name='Vendor'),
    }
  ](name='Architecture'),
  requestId?: string(name='RequestId'),
}

model ListArchitectureAttributeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListArchitectureAttributeResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param request ListArchitectureAttributeRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return ListArchitectureAttributeResponse
 */
// Deprecated
async function listArchitectureAttributeWithOptions(request: ListArchitectureAttributeRequest, runtime: Util.RuntimeOptions): ListArchitectureAttributeResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListArchitectureAttribute',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request ListArchitectureAttributeRequest
  * @return ListArchitectureAttributeResponse
 */
// Deprecated
async function listArchitectureAttribute(request: ListArchitectureAttributeRequest): ListArchitectureAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return listArchitectureAttributeWithOptions(request, runtime);
}

model ListConfigurationSpecificationsRequest {
  architecture?: string(name='Architecture', example='5.0'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  maxResults?: int32(name='MaxResults', example='100'),
  model?: string(name='Model', example='3601'),
  nextToken?: string(name='NextToken', example='1'),
  role?: string(name='Role', example='DSW'),
  specificationName?: string(name='SpecificationName', example='Specification_5.0'),
  vendor?: string(name='Vendor', example='Alibaba'),
}

model ListConfigurationSpecificationsResponseBody = {
  configurationSpecification?: [ 
    {
      architecture?: string(name='Architecture', example='5.0'),
      configurationSpecificationId?: string(name='ConfigurationSpecificationId', example='configurationSpecificationId'),
      createTime?: string(name='CreateTime', description='代表创建时间的资源属性字段', example='2020-02-01'),
      model?: string(name='Model', example='5750'),
      relatedVariate?: [ string ](name='RelatedVariate'),
      role?: string(name='Role', example='DSW'),
      specificationContent?: string(name='SpecificationContent', example='config'),
      specificationName?: string(name='SpecificationName', example='ASW'),
      updateTime?: string(name='UpdateTime', example='2020-02-01'),
      vendor?: string(name='Vendor', example='HUAWEI'),
    }
  ](name='ConfigurationSpecification'),
  maxResults?: long(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='1'),
  requestId?: string(name='RequestId', example='requestId'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListConfigurationSpecificationsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListConfigurationSpecificationsResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param request ListConfigurationSpecificationsRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return ListConfigurationSpecificationsResponse
 */
// Deprecated
async function listConfigurationSpecificationsWithOptions(request: ListConfigurationSpecificationsRequest, runtime: Util.RuntimeOptions): ListConfigurationSpecificationsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListConfigurationSpecifications',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request ListConfigurationSpecificationsRequest
  * @return ListConfigurationSpecificationsResponse
 */
// Deprecated
async function listConfigurationSpecifications(request: ListConfigurationSpecificationsRequest): ListConfigurationSpecificationsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listConfigurationSpecificationsWithOptions(request, runtime);
}

model ListConfigurationVariateRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  maxResults?: int32(name='MaxResults', example='100'),
  nextToken?: string(name='NextToken', example='1'),
  variateName?: string(name='VariateName', example='project'),
}

model ListConfigurationVariateResponseBody = {
  configurationVariate?: [ 
    {
      comment?: string(name='Comment', example='主机名'),
      configurationVariateId?: string(name='ConfigurationVariateId', example='kkoo'),
      createTime?: string(name='CreateTime', description='代表创建时间的资源属性字段', example='2020-12-22 10:39:17'),
      formatFunction?: string(name='FormatFunction', example='def main():'),
      updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
      variateName?: string(name='VariateName', example='hostname'),
    }
  ](name='ConfigurationVariate'),
  maxResults?: long(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='1'),
  requestId?: string(name='RequestId', example='requestId'),
  totalCount?: int32(name='TotalCount', example='200'),
}

model ListConfigurationVariateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListConfigurationVariateResponseBody(name='body'),
}

async function listConfigurationVariateWithOptions(request: ListConfigurationVariateRequest, runtime: Util.RuntimeOptions): ListConfigurationVariateResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListConfigurationVariate',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listConfigurationVariate(request: ListConfigurationVariateRequest): ListConfigurationVariateResponse {
  var runtime = new Util.RuntimeOptions{};
  return listConfigurationVariateWithOptions(request, runtime);
}

model ListConnectionPoliciesRequest {
  architectureIterationId?: string(name='ArchitectureIterationId', description='架构迭代uid', example='1e0rlfc3358e8h8f'),
  connectionPolicyId?: string(name='ConnectionPolicyId', description='连接策略名字', example='1e0rlfc3358e8h8f'),
  downlinkArchitectureDeviceId?: string(name='DownlinkArchitectureDeviceId', description='下联设备uid', example='1e0rlfc3358e8h8f'),
  downlinkArchitectureModuleId?: string(name='DownlinkArchitectureModuleId', description='下联模块uid', example='1e0rlfc3358e8h8f'),
  instanceId?: string(name='InstanceId'),
  maxResults?: int32(name='MaxResults'),
  nextToken?: string(name='NextToken'),
  uplinkArchitectureDeviceId?: string(name='UplinkArchitectureDeviceId', description='上联设备uid', example='1e0rlfc3358e8h8f'),
  uplinkArchitectureModuleId?: string(name='UplinkArchitectureModuleId', description='上联模块uid', example='1e0rlfc3358e8h8f'),
}

model ListConnectionPoliciesResponseBody = {
  connectionPolicy?: [ 
    {
      algorithm?: string(name='Algorithm', example='笛卡尔互联'),
      architectureIterationId?: string(name='ArchitectureIterationId', example='1e0rlfc3358e8h8f'),
      createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
      downlinkArchitectureDeviceId?: string(name='DownlinkArchitectureDeviceId', description='上联设备uid', example='1e0rlfc3358e8h8f'),
      downlinkArchitectureModuleId?: string(name='DownlinkArchitectureModuleId', description='下联设备uid', example='1e0rlfc3358e8h8f'),
      id?: string(name='Id', example='1e0rlfc3358e8h8f'),
      linkCount?: int32(name='LinkCount', example='2'),
      name?: string(name='Name', example='pswtoasw'),
      updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
      uplinkArchitectureDeviceId?: string(name='UplinkArchitectureDeviceId', description='上联模块uid', example='1e0rlfc3358e8h8f'),
      uplinkArchitectureModuleId?: string(name='UplinkArchitectureModuleId', description='下联模块uid', example='1e0rlfc3358e8h8f'),
    }
  ](name='ConnectionPolicy'),
  maxResults?: long(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListConnectionPoliciesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListConnectionPoliciesResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param request ListConnectionPoliciesRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return ListConnectionPoliciesResponse
 */
// Deprecated
async function listConnectionPoliciesWithOptions(request: ListConnectionPoliciesRequest, runtime: Util.RuntimeOptions): ListConnectionPoliciesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.architectureIterationId)) {
    body['ArchitectureIterationId'] = request.architectureIterationId;
  }
  if (!Util.isUnset(request.connectionPolicyId)) {
    body['ConnectionPolicyId'] = request.connectionPolicyId;
  }
  if (!Util.isUnset(request.downlinkArchitectureDeviceId)) {
    body['DownlinkArchitectureDeviceId'] = request.downlinkArchitectureDeviceId;
  }
  if (!Util.isUnset(request.downlinkArchitectureModuleId)) {
    body['DownlinkArchitectureModuleId'] = request.downlinkArchitectureModuleId;
  }
  if (!Util.isUnset(request.uplinkArchitectureDeviceId)) {
    body['UplinkArchitectureDeviceId'] = request.uplinkArchitectureDeviceId;
  }
  if (!Util.isUnset(request.uplinkArchitectureModuleId)) {
    body['UplinkArchitectureModuleId'] = request.uplinkArchitectureModuleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListConnectionPolicies',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request ListConnectionPoliciesRequest
  * @return ListConnectionPoliciesResponse
 */
// Deprecated
async function listConnectionPolicies(request: ListConnectionPoliciesRequest): ListConnectionPoliciesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listConnectionPoliciesWithOptions(request, runtime);
}

model ListDedicatedLinesRequest {
  bandwidth?: int32(name='Bandwidth', example='100'),
  dedicatedLineGateway?: string(name='DedicatedLineGateway', example='111.111.xxx.xxx'),
  dedicatedLineIp?: string(name='DedicatedLineIp', example='111.111.xxx.xxx'),
  dedicatedLineRole?: string(name='DedicatedLineRole', example='主'),
  description?: string(name='Description', example='备注'),
  deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
  deviceName?: string(name='DeviceName', example='HZYT_USG6620_A'),
  devicePort?: string(name='DevicePort', example='GigabitEthernet1/0/0'),
  expirationDate?: string(name='ExpirationDate', example='2022-06-14 04:00:00'),
  extAttributes?: string(name='ExtAttributes', example='{"Location":"cdc"}'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  isp?: string(name='Isp', example='中国电信'),
  ispFormId?: string(name='IspFormId', example='space_isp_form-garigikip9zrog'),
  ispId?: string(name='IspId', example='isp-dhyw2lxfpcs80d9'),
  keyword?: string(name='Keyword', example='飞天园区_中国电信_主'),
  keywords?: string(name='Keywords', example='测试'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  onlineDate?: string(name='OnlineDate', example='2022-06-13 12:00:00'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
  spaceName?: string(name='SpaceName', example='阿里巴巴西溪园区'),
}

model ListDedicatedLinesResponseBody = {
  dedicatedLines?: [ 
    {
      bandwidth?: int32(name='Bandwidth', example='100'),
      contact?: [ 
        {
          description?: string(name='Description'),
          email?: string(name='Email', example='example@aliyun.com'),
          name?: string(name='Name', example='张三'),
          phone?: string(name='Phone', example='133xxxxxxx'),
        }
      ](name='Contact'),
      dedicatedLineGateway?: string(name='DedicatedLineGateway', example='111.111.xxx.xxx'),
      dedicatedLineId?: string(name='DedicatedLineId', example='space_isp-6dk5xpoyoopr6obf'),
      dedicatedLineIp?: string(name='DedicatedLineIp', example='111.111.xxx.xxx'),
      dedicatedLineRole?: string(name='DedicatedLineRole', example='主'),
      description?: string(name='Description', example='备注'),
      deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
      deviceName?: string(name='DeviceName', example='HZYT_USG6620_A'),
      devicePort?: string(name='DevicePort', example='GigabitEthernet1/0/0'),
      expirationDate?: string(name='ExpirationDate', example='2022-06-14 04:00:00'),
      ext?: string(name='Ext', example='{\\"location\\":\\"cdc\\"}'),
      isp?: string(name='Isp', example='电信'),
      ispFormId?: string(name='IspFormId', example='space_isp_form-garigikip9zrog'),
      ispFormName?: string(name='IspFormName', example='普通专线'),
      ispId?: string(name='IspId', example='isp-dhyw2lxfpcs80d9'),
      keyword?: string(name='Keyword', example='飞天园区_中国电信_主'),
      onlineDate?: string(name='OnlineDate', example='2022-06-13 12:00:00'),
      phone?: string(name='Phone', example='133********'),
      physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
      spaceName?: string(name='SpaceName', example='阿里巴巴西溪园区'),
    }
  ](name='DedicatedLines'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='10'),
  requestId?: string(name='RequestId', example='8de935f6-90c7-444e-a2b4-bb4185153435'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListDedicatedLinesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDedicatedLinesResponseBody(name='body'),
}

async function listDedicatedLinesWithOptions(request: ListDedicatedLinesRequest, runtime: Util.RuntimeOptions): ListDedicatedLinesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDedicatedLines',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDedicatedLines(request: ListDedicatedLinesRequest): ListDedicatedLinesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDedicatedLinesWithOptions(request, runtime);
}

model ListDeviceFormsRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
}

model ListDeviceFormsResponseBody = {
  deviceForms?: [ 
    {
      accountConfig?: boolean(name='AccountConfig', description='是否需要账号配置', example='true'),
      attributeList?: [ 
        {
          attributeBuiltIn?: boolean(name='AttributeBuiltIn', description='内置属性不可修改和删除', example='true'),
          attributeContent?: string(name='AttributeContent', example='ASW,PSW,DSW,CSW,CR,FW,AC/AP,UNKNOWN,AP'),
          attributeFormat?: string(name='AttributeFormat', description='设备形态属性值格式', example='STRING'),
          attributeFuzzyQuery?: boolean(name='AttributeFuzzyQuery', description='前端查询控件是否支持模糊搜索', example='false'),
          attributeKey?: string(name='AttributeKey', description='设备形态属性主键', example='serviceStatus'),
          attributeName?: string(name='AttributeName', description='设备形态属性名称', example='服务状态'),
          attributePlaceholder?: string(name='AttributePlaceholder', description='前端查询控件占位符', example='前端占位符说明'),
          attributeQuery?: boolean(name='AttributeQuery', description='前端是否展示对应的查询控件', example='false'),
          attributeReference?: string(name='AttributeReference', description='设备形态属性关联对象', example='status'),
          attributeRequirement?: boolean(name='AttributeRequirement', description='设备形态属性是否必填', example='true'),
          attributeSequence?: int32(name='AttributeSequence', example='1'),
          attributeTableDisplay?: boolean(name='AttributeTableDisplay', description='设备形态属性是否表格可见', example='true'),
          attributeType?: string(name='AttributeType', description='设备形态属性值类型', example='ENUMS'),
          attributeUniqueness?: boolean(name='AttributeUniqueness', description='设备形态属性是否唯一', example='false'),
        }
      ](name='AttributeList', description='设备形态属性列表'),
      configCompare?: boolean(name='ConfigCompare', description='是否支持配置生成', example='true'),
      detailDisplay?: boolean(name='DetailDisplay', example='true'),
      deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
      deviceFormName?: string(name='DeviceFormName', example='网络设备'),
      formBuiltIn?: boolean(name='FormBuiltIn', description='内置形态不可修改和删除', example='true'),
      relatedDeviceFormId?: string(name='RelatedDeviceFormId', example='form-4gnk12c2pdp4qu42'),
      resourceUse?: string(name='ResourceUse', example='DEV_OPS'),
      script?: string(name='Script', example='@login_device\\r\\ndef config_backup():\\r\\n    exec_cli(\\"show license\\", timeout=120)\\r\\n    return exec_cli(\\"show config\\", timeout=180)'),
      uniqueKey?: string(name='UniqueKey', example='SN'),
    }
  ](name='DeviceForms'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='11'),
  requestId?: string(name='RequestId', example='6d439436-ddde-4f26-aaf6-0470099b5c35'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListDeviceFormsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDeviceFormsResponseBody(name='body'),
}

async function listDeviceFormsWithOptions(request: ListDeviceFormsRequest, runtime: Util.RuntimeOptions): ListDeviceFormsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceForms',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDeviceForms(request: ListDeviceFormsRequest): ListDeviceFormsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDeviceFormsWithOptions(request, runtime);
}

model ListDevicePropertiesRequest {
  deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
  instanceId?: string(name='InstanceId', description='实例ID', example='cmn-cn-xxx'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
}

model ListDevicePropertiesResponseBody = {
  deviceProperties?: [ 
    {
      builtIn?: boolean(name='BuiltIn', example='true'),
      deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
      deviceFormName?: string(name='DeviceFormName', example='网络设备'),
      devicePropertyId?: string(name='DevicePropertyId', example='property-z50wex75a1lkx7vx'),
      propertyContent?: string(name='PropertyContent', example='{   "H3C": [     "H3C S6800",     "S6850-56HF"   ],   "Huawei": [     "CE6851-48S6Q"   ] }'),
      propertyFormat?: string(name='PropertyFormat', example='JSON'),
      propertyKey?: string(name='PropertyKey', example='device_model'),
      propertyName?: string(name='PropertyName', example='厂商型号'),
    }
  ](name='DeviceProperties'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='10'),
  requestId?: string(name='RequestId', description='Id of the request', example='1f598491-db6d-4276-a83a-3b5f57d4a4e1'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListDevicePropertiesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDevicePropertiesResponseBody(name='body'),
}

async function listDevicePropertiesWithOptions(request: ListDevicePropertiesRequest, runtime: Util.RuntimeOptions): ListDevicePropertiesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceProperties',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDeviceProperties(request: ListDevicePropertiesRequest): ListDevicePropertiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDevicePropertiesWithOptions(request, runtime);
}

model ListDeviceResourcesRequest {
  businessType?: string(name='BusinessType', example='LOOPBACK、BUSINESS、  INTERCONNECTION'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  listType?: string(name='ListType', example='NORMAL、APPLY、RELEASE'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  setupProjectId?: string(name='SetupProjectId', example='setupProjectId'),
}

model ListDeviceResourcesResponseBody = {
  deviceResource?: [ 
    {
      blockNumber?: string(name='BlockNumber', example='1'),
      business?: string(name='Business', example='{}'),
      config?: string(name='Config', example='config'),
      configTaskId?: string(name='ConfigTaskId', example='config_task'),
      configTaskStatus?: string(name='ConfigTaskStatus', example='UNDO, RUNNING, SUCCESS, FAILURE'),
      deliveryIp?: string(name='DeliveryIp', example='192.168.1.1'),
      deviceNumber?: string(name='DeviceNumber', example='ConfigurationSpecificationName'),
      deviceResourceId?: string(name='DeviceResourceId', description='代表资源一级ID的资源属性字段', example='resourceId'),
      generateConfig?: string(name='GenerateConfig', example='true'),
      hostName?: string(name='HostName', example='DSW-xxxyyy'),
      interConnection?: string(name='InterConnection', example='{}'),
      location?: string(name='Location', example='杭州-EFC'),
      loopback?: string(name='Loopback', example='{}'),
      managerIp?: string(name='ManagerIp', example='11.12.13.54'),
      model?: string(name='Model', example='5566'),
      params?: string(name='Params', example='params'),
      role?: string(name='Role', example='DSW'),
      setupProjectId?: string(name='SetupProjectId', description='建设项目id', example='xxx_zzz'),
      sn?: string(name='Sn', example='123'),
      specification?: string(name='Specification', example='config'),
      stack?: boolean(name='Stack', example='false'),
      vendor?: string(name='Vendor', example='Ruijie'),
    }
  ](name='DeviceResource'),
  maxResults?: long(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='""'),
  requestId?: string(name='RequestId', example='requestId'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListDeviceResourcesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDeviceResourcesResponseBody(name='body'),
}

async function listDeviceResourcesWithOptions(request: ListDeviceResourcesRequest, runtime: Util.RuntimeOptions): ListDeviceResourcesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceResources',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDeviceResources(request: ListDeviceResourcesRequest): ListDeviceResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDeviceResourcesWithOptions(request, runtime);
}

model ListDeviceValuesRequest {
  attributeGroup?: string(name='AttributeGroup', example='model'),
  attributeKeyword?: string(name='AttributeKeyword', example='vendor'),
  deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
  deviceFormName?: string(name='DeviceFormName', example='网络形态'),
  instanceId?: string(name='InstanceId', description='实例ID', example='cmn-cn-xxx'),
}

model ListDeviceValuesResponseBody = {
  deviceValues?: [ string ](name='DeviceValues'),
  requestId?: string(name='RequestId', description='Id of the request', example='6d439436-ddde-4f26-aaf6-0470099b5c35'),
}

model ListDeviceValuesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDeviceValuesResponseBody(name='body'),
}

async function listDeviceValuesWithOptions(request: ListDeviceValuesRequest, runtime: Util.RuntimeOptions): ListDeviceValuesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceValues',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDeviceValues(request: ListDeviceValuesRequest): ListDeviceValuesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDeviceValuesWithOptions(request, runtime);
}

model ListDevicesRequest {
  calculateAmount?: boolean(name='CalculateAmount', example='true'),
  deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
  deviceFormName?: string(name='DeviceFormName', example='网络设备'),
  deviceIds?: [ string ](name='DeviceIds'),
  extAttributes?: string(name='ExtAttributes', example='{"role":"ASW"}'),
  hostName?: [ string ](name='HostName', example='space-ez6zd3w68ma4fsd4'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  ip?: [ string ](name='Ip'),
  keyword?: string(name='Keyword', example='G1QH55J******'),
  mac?: [ string ](name='Mac'),
  maxResults?: int32(name='MaxResults', example='10'),
  model?: [ string ](name='Model'),
  nextToken?: string(name='NextToken', example='1'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
  physicalSpaceIds?: [ string ](name='PhysicalSpaceIds'),
  securityDomain?: [ string ](name='SecurityDomain', example='AH01'),
  serviceStatus?: [ string ](name='ServiceStatus'),
  sn?: [ string ](name='Sn'),
  vendor?: [ string ](name='Vendor'),
}

model ListDevicesShrinkRequest {
  calculateAmount?: boolean(name='CalculateAmount', example='true'),
  deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
  deviceFormName?: string(name='DeviceFormName', example='网络设备'),
  deviceIdsShrink?: string(name='DeviceIds'),
  extAttributes?: string(name='ExtAttributes', example='{"role":"ASW"}'),
  hostNameShrink?: string(name='HostName', example='space-ez6zd3w68ma4fsd4'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  ipShrink?: string(name='Ip'),
  keyword?: string(name='Keyword', example='G1QH55J******'),
  macShrink?: string(name='Mac'),
  maxResults?: int32(name='MaxResults', example='10'),
  modelShrink?: string(name='Model'),
  nextToken?: string(name='NextToken', example='1'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
  physicalSpaceIdsShrink?: string(name='PhysicalSpaceIds'),
  securityDomainShrink?: string(name='SecurityDomain', example='AH01'),
  serviceStatusShrink?: string(name='ServiceStatus'),
  snShrink?: string(name='Sn'),
  vendorShrink?: string(name='Vendor'),
}

model ListDevicesResponseBody = {
  amountDetail?: string(name='AmountDetail', example='{"networkOnlineCount":11,"serverOnlineCount":7,"iotOnlineCount":2,"otherOnlineCount":0,"networkMaintainCount":0,"serverMaintainCount":0,"iotMaintainCount":0,"otherMaintainCount":0,"networkUdfStatusCount":5,"serverUdfStatusCount":0,"iotUdfStatusCount":0,"otherUdfStatusCount":0,"ratioNetworkCount":16,"ratioServerCount":3,"ratioIotCount":0,"ratioOtherCount":0}'),
  amountUsed?: int32(name='AmountUsed', example='10'),
  devices?: [ 
    {
      deviceFormId?: string(name='DeviceFormId', example='form-u4ilnhu64h026lrf'),
      deviceFormName?: string(name='DeviceFormName', example='网络设备'),
      deviceId?: string(name='DeviceId', description='设备ID', example='device-evve560juend5owh'),
      enablePassword?: string(name='EnablePassword', example='123456'),
      extAttributes?: string(name='ExtAttributes', description='设备额外属性(JSON)', example='{"role":"ASW"}'),
      gmtCreate?: string(name='GmtCreate', example='2022-11-08 09:00:58'),
      gmtModified?: string(name='GmtModified', example='2023-01-16 09:43:20'),
      hostName?: string(name='HostName', description='主机名', example='HZYT_USG6620_A'),
      ip?: string(name='Ip', description='设备IP', example='10.17.101.1'),
      loginPassword?: string(name='LoginPassword', description='登录账号', example='123456'),
      loginType?: string(name='LoginType', description='登录类型，SSH或者TELNET', example='SSH,TELNET'),
      loginUsername?: string(name='LoginUsername', description='登录账号', example='admin'),
      mac?: string(name='Mac', description='设备MAC地址', example='b8:27:eb:34:3b:a2'),
      model?: string(name='Model', description='设备型号', example='USG6620'),
      physicalSpaceId?: string(name='PhysicalSpaceId', description='物理空间ID', example='space-ez6zd3w68ma4fsd4'),
      physicalSpaceName?: string(name='PhysicalSpaceName', description='物理空间名称', example='阿里巴巴西溪园区'),
      securityDomain?: string(name='SecurityDomain', description='设备安全域', example='IT'),
      serviceStatus?: string(name='ServiceStatus', description='设备状态', example='online'),
      sn?: string(name='Sn', description='设备SN', example='210235951910K7000016'),
      snmpAccountType?: string(name='SnmpAccountType', description='SNMP 账号类型', example='get'),
      snmpAccountVersion?: string(name='SnmpAccountVersion', description='SNMP版本号', example='v3'),
      snmpAuthPassphrase?: string(name='SnmpAuthPassphrase', description='SNMP Auth PassPhrase', example='pass****'),
      snmpAuthProtocol?: string(name='SnmpAuthProtocol', description='SNMP Auth Protocol', example='MD5'),
      snmpCommunity?: string(name='SnmpCommunity', description='SNMP Community', example='123456'),
      snmpPrivacyPassphrase?: string(name='SnmpPrivacyPassphrase', description='SNMP Privacy Passphrase', example='pass****'),
      snmpPrivacyProtocol?: string(name='SnmpPrivacyProtocol', description='SNMP Privacy Protocol', example='DES'),
      snmpSecurityLevel?: string(name='SnmpSecurityLevel', description='SNMP 安全级别', example='AUTH_PRIV'),
      snmpUsername?: string(name='SnmpUsername', description='SNMP 用户名', example='admin'),
      vendor?: string(name='Vendor', description='设备厂商', example='Huawei'),
    }
  ](name='Devices'),
  iotCoefficient?: int32(name='IotCoefficient', example='1'),
  maxResults?: int32(name='MaxResults', example='10'),
  networkCoefficient?: int32(name='NetworkCoefficient', example='1'),
  networkMaintenanceCoefficient?: int32(name='NetworkMaintenanceCoefficient', example='1'),
  nextToken?: int32(name='NextToken', example='10'),
  otherCoefficient?: int32(name='OtherCoefficient', example='1'),
  requestId?: string(name='RequestId', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
  serverCoefficient?: int32(name='ServerCoefficient', example='1'),
  serverMaintenanceCoefficient?: int32(name='ServerMaintenanceCoefficient', example='1'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDevicesResponseBody(name='body'),
}

async function listDevicesWithOptions(tmpReq: ListDevicesRequest, runtime: Util.RuntimeOptions): ListDevicesResponse {
  Util.validateModel(tmpReq);
  var request = new ListDevicesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceIds)) {
    request.deviceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceIds, 'DeviceIds', 'json');
  }
  if (!Util.isUnset(tmpReq.hostName)) {
    request.hostNameShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.hostName, 'HostName', 'json');
  }
  if (!Util.isUnset(tmpReq.ip)) {
    request.ipShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.ip, 'Ip', 'json');
  }
  if (!Util.isUnset(tmpReq.mac)) {
    request.macShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.mac, 'Mac', 'json');
  }
  if (!Util.isUnset(tmpReq.model)) {
    request.modelShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.model, 'Model', 'json');
  }
  if (!Util.isUnset(tmpReq.physicalSpaceIds)) {
    request.physicalSpaceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.physicalSpaceIds, 'PhysicalSpaceIds', 'json');
  }
  if (!Util.isUnset(tmpReq.securityDomain)) {
    request.securityDomainShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.securityDomain, 'SecurityDomain', 'json');
  }
  if (!Util.isUnset(tmpReq.serviceStatus)) {
    request.serviceStatusShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.serviceStatus, 'ServiceStatus', 'json');
  }
  if (!Util.isUnset(tmpReq.sn)) {
    request.snShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sn, 'Sn', 'json');
  }
  if (!Util.isUnset(tmpReq.vendor)) {
    request.vendorShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.vendor, 'Vendor', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.calculateAmount)) {
    query['CalculateAmount'] = request.calculateAmount;
  }
  if (!Util.isUnset(request.deviceFormId)) {
    query['DeviceFormId'] = request.deviceFormId;
  }
  if (!Util.isUnset(request.deviceFormName)) {
    query['DeviceFormName'] = request.deviceFormName;
  }
  if (!Util.isUnset(request.deviceIdsShrink)) {
    query['DeviceIds'] = request.deviceIdsShrink;
  }
  if (!Util.isUnset(request.extAttributes)) {
    query['ExtAttributes'] = request.extAttributes;
  }
  if (!Util.isUnset(request.hostNameShrink)) {
    query['HostName'] = request.hostNameShrink;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.ipShrink)) {
    query['Ip'] = request.ipShrink;
  }
  if (!Util.isUnset(request.keyword)) {
    query['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.macShrink)) {
    query['Mac'] = request.macShrink;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.modelShrink)) {
    query['Model'] = request.modelShrink;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.physicalSpaceId)) {
    query['PhysicalSpaceId'] = request.physicalSpaceId;
  }
  if (!Util.isUnset(request.physicalSpaceIdsShrink)) {
    query['PhysicalSpaceIds'] = request.physicalSpaceIdsShrink;
  }
  if (!Util.isUnset(request.securityDomainShrink)) {
    query['SecurityDomain'] = request.securityDomainShrink;
  }
  if (!Util.isUnset(request.serviceStatusShrink)) {
    query['ServiceStatus'] = request.serviceStatusShrink;
  }
  if (!Util.isUnset(request.snShrink)) {
    query['Sn'] = request.snShrink;
  }
  if (!Util.isUnset(request.vendorShrink)) {
    query['Vendor'] = request.vendorShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDevices',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDevices(request: ListDevicesRequest): ListDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDevicesWithOptions(request, runtime);
}

model ListEventDefinitionsRequest {
  eventId?: string(name='EventId', example='e-l22277akor7iajno'),
  eventName?: string(name='EventName'),
  eventType?: string(name='EventType', example='SYSLOG_EVENT'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
}

model ListEventDefinitionsResponseBody = {
  eventDefinitions?: [
    EventDefinition
  ](name='EventDefinitions'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='21'),
  requestId?: string(name='RequestId', description='Id of the request', example='BC004409-9E71-57FC-8E9A-7929665BF39B'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model ListEventDefinitionsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListEventDefinitionsResponseBody(name='body'),
}

async function listEventDefinitionsWithOptions(request: ListEventDefinitionsRequest, runtime: Util.RuntimeOptions): ListEventDefinitionsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListEventDefinitions',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listEventDefinitions(request: ListEventDefinitionsRequest): ListEventDefinitionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEventDefinitionsWithOptions(request, runtime);
}

model ListEventsRequest {
  alarmStatus?: string(name='AlarmStatus', example='WARNING'),
  deviceId?: string(name='DeviceId', example='device-23ecvcvf0'),
  eventType?: string(name='EventType', example='SYSLOG_EVENT'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxxx'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-dcfv9cof4e'),
}

model ListEventsResponseBody = {
  events?: [
    Event
  ](name='Events'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  requestId?: string(name='RequestId', description='Id of the request', example='403CDD53-2A04-55C9-822A-6EE4931C3332'),
  statistics?: [ 
    {
      count?: int32(name='Count', example='10'),
      status?: string(name='Status', example='WARNING'),
    }
  ](name='Statistics'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model ListEventsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListEventsResponseBody(name='body'),
}

async function listEventsWithOptions(request: ListEventsRequest, runtime: Util.RuntimeOptions): ListEventsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListEvents',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listEvents(request: ListEventsRequest): ListEventsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEventsWithOptions(request, runtime);
}

model ListInspectionDevicesRequest {
  appState?: string(name='AppState', example='online/offline'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  model?: [ string ](name='Model'),
  role?: string(name='Role', example='ASW'),
  space?: string(name='Space', example='阿里巴巴西溪园区'),
  vendor?: string(name='Vendor', example='Huawei'),
}

model ListInspectionDevicesShrinkRequest {
  appState?: string(name='AppState', example='online/offline'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  modelShrink?: string(name='Model'),
  role?: string(name='Role', example='ASW'),
  space?: string(name='Space', example='阿里巴巴西溪园区'),
  vendor?: string(name='Vendor', example='Huawei'),
}

model ListInspectionDevicesResponseBody = {
  inspectionScripts?: [ 
    {
      appState?: string(name='AppState', example='online'),
      deviceId?: string(name='DeviceId', example='wew'),
      deviceState?: string(name='DeviceState', example='online'),
      hostName?: string(name='HostName', example='weq'),
      manageIp?: string(name='ManageIp', example='192.168.xxx.xxx'),
      model?: string(name='Model', example='5710'),
      role?: string(name='Role', example='ASW'),
      space?: string(name='Space', example='EFC'),
      vendor?: string(name='Vendor', example='Huawei'),
    }
  ](name='InspectionScripts', description='content'),
  requestId?: string(name='RequestId', description='Id of the request', example='B24B378C-6025-58E2-A1A5-A5E4FBBF2D64'),
}

model ListInspectionDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListInspectionDevicesResponseBody(name='body'),
}

async function listInspectionDevicesWithOptions(tmpReq: ListInspectionDevicesRequest, runtime: Util.RuntimeOptions): ListInspectionDevicesResponse {
  Util.validateModel(tmpReq);
  var request = new ListInspectionDevicesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.model)) {
    request.modelShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.model, 'Model', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListInspectionDevices',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listInspectionDevices(request: ListInspectionDevicesRequest): ListInspectionDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listInspectionDevicesWithOptions(request, runtime);
}

model ListInspectionTaskReportsRequest {
  inspectionItemId?: string(name='InspectionItemId', example='sssooo'),
  instanceId?: string(name='InstanceId'),
  vendor?: string(name='Vendor', example='Ruijie'),
}

model ListInspectionTaskReportsResponseBody = {
  inspectionTask?: [ 
    {
      actualDeviceNumber?: long(name='ActualDeviceNumber', example='2'),
      alarmNumber?: long(name='AlarmNumber', example='21'),
      alarmStatistic?: [ 
        {
          criticalNumber?: long(name='CriticalNumber', example='21'),
          inspectionItem?: string(name='InspectionItem', example='get_interface'),
          model?: string(name='Model', example='5750'),
          vendor?: string(name='Vendor', example='Ruijie'),
          warningNumber?: long(name='WarningNumber', example='12'),
        }
      ](name='AlarmStatistic'),
      criticalNumber?: long(name='CriticalNumber', example='2'),
      criticalRate?: string(name='CriticalRate', example='1%'),
      deviceRate?: string(name='DeviceRate', example='1%'),
      failureStatistic?: string(name='FailureStatistic', example='“”'),
      failureTaskNumber?: long(name='FailureTaskNumber', example='2'),
      failureTaskRate?: string(name='FailureTaskRate', example='1%'),
      normalNumber?: long(name='NormalNumber', example='21'),
      normalRate?: string(name='NormalRate', example='1%'),
      runningTaskNumber?: long(name='RunningTaskNumber', example='2'),
      runningTaskRate?: string(name='RunningTaskRate', example='1%'),
      successTaskNumber?: long(name='SuccessTaskNumber', example='2'),
      successTaskRate?: string(name='SuccessTaskRate', example='1%'),
      taskNumber?: long(name='TaskNumber', example='12'),
      totalDeviceNumber?: long(name='TotalDeviceNumber', example='12'),
      warningNumber?: long(name='WarningNumber', example='65'),
      warningRate?: string(name='WarningRate', example='1%'),
    }
  ](name='InspectionTask'),
  requestId?: string(name='RequestId'),
}

model ListInspectionTaskReportsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListInspectionTaskReportsResponseBody(name='body'),
}

async function listInspectionTaskReportsWithOptions(request: ListInspectionTaskReportsRequest, runtime: Util.RuntimeOptions): ListInspectionTaskReportsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListInspectionTaskReports',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listInspectionTaskReports(request: ListInspectionTaskReportsRequest): ListInspectionTaskReportsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listInspectionTaskReportsWithOptions(request, runtime);
}

model ListInspectionTasksRequest {
  alarmStatus?: [ string ](name='AlarmStatus'),
  deviceType?: string(name='DeviceType', example='NETWORK'),
  hostName?: string(name='HostName', example='ASW-S-3F1-1.CD1'),
  IP?: string(name='IP', example='127.0.0.1'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  itemId?: string(name='ItemId', example='ITEMsjie22342'),
  maxResults?: int32(name='MaxResults', example='10'),
  model?: string(name='Model', example='SAG-100WM'),
  nextToken?: string(name='NextToken', example='1'),
  role?: string(name='Role', example='ASW'),
  space?: string(name='Space', example='XX门店'),
  taskStatus?: string(name='TaskStatus', example='SUCCESS'),
  vendor?: string(name='Vendor', example='Alibaba'),
}

model ListInspectionTasksShrinkRequest {
  alarmStatusShrink?: string(name='AlarmStatus'),
  deviceType?: string(name='DeviceType', example='NETWORK'),
  hostName?: string(name='HostName', example='ASW-S-3F1-1.CD1'),
  IP?: string(name='IP', example='127.0.0.1'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  itemId?: string(name='ItemId', example='ITEMsjie22342'),
  maxResults?: int32(name='MaxResults', example='10'),
  model?: string(name='Model', example='SAG-100WM'),
  nextToken?: string(name='NextToken', example='1'),
  role?: string(name='Role', example='ASW'),
  space?: string(name='Space', example='XX门店'),
  taskStatus?: string(name='TaskStatus', example='SUCCESS'),
  vendor?: string(name='Vendor', example='Alibaba'),
}

model ListInspectionTasksResponseBody = {
  inspectionTasks?: [ 
    {
      alarmStatus?: string(name='AlarmStatus', example='WARNING'),
      deviceId?: string(name='DeviceId', example='DEVICEsljwo234'),
      deviceType?: string(name='DeviceType', example='NETWORK'),
      errorCode?: string(name='ErrorCode', example='AGENT_LOGIN_FAIL'),
      executionBeginTime?: string(name='ExecutionBeginTime', example='2020-12-23 10:01:05'),
      executionEndTime?: string(name='ExecutionEndTime', example='2020-12-23 10:01:05'),
      hostName?: string(name='HostName', example='30.20.128.2'),
      IP?: string(name='IP', example='30.20.128.2'),
      inspectionAlarmRules?: [ 
        {
          actualValue?: string(name='ActualValue', example='11'),
          alarmExpression?: string(name='AlarmExpression', example='>'),
          alarmLevel?: string(name='AlarmLevel', example='warning'),
          alarmOperator?: string(name='AlarmOperator', example='A'),
          alarmValue?: string(name='AlarmValue', example='10'),
        }
      ](name='InspectionAlarmRules'),
      inspectionMessage?: string(name='InspectionMessage', example='error: Telnet Login failed'),
      inspectionResult?: string(name='InspectionResult', example='{}'),
      isInspectionResultTruncation?: boolean(name='IsInspectionResultTruncation', example='true'),
      itemId?: string(name='ItemId', example='ITEMsjie22342'),
      itemName?: string(name='ItemName', example='get_status'),
      model?: [ string ](name='Model', example='F101'),
      role?: string(name='Role', example='ASW'),
      scriptId?: string(name='ScriptId', example='TEMPLATEsdjlsa2334-2343-23'),
      space?: string(name='Space', example='武汉光谷国际店'),
      taskId?: string(name='TaskId', example='TASK-swe-23-sds'),
      taskStatus?: string(name='TaskStatus', example='SUCCESS'),
      vendor?: string(name='Vendor', example='Alibaba'),
    }
  ](name='InspectionTasks'),
  nextToken?: int32(name='NextToken', example='""或"1"'),
  requestId?: string(name='RequestId', example='AC8F05E6-AFBB-4ABE-B75E-A6539A9BAAA8'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model ListInspectionTasksResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListInspectionTasksResponseBody(name='body'),
}

async function listInspectionTasksWithOptions(tmpReq: ListInspectionTasksRequest, runtime: Util.RuntimeOptions): ListInspectionTasksResponse {
  Util.validateModel(tmpReq);
  var request = new ListInspectionTasksShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.alarmStatus)) {
    request.alarmStatusShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.alarmStatus, 'AlarmStatus', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListInspectionTasks',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listInspectionTasks(request: ListInspectionTasksRequest): ListInspectionTasksResponse {
  var runtime = new Util.RuntimeOptions{};
  return listInspectionTasksWithOptions(request, runtime);
}

model ListInstancesResponseBody = {
  instances?: [ 
    {
      instanceDeviceMaxCount?: string(name='InstanceDeviceMaxCount', example='100'),
      instanceEndDate?: string(name='InstanceEndDate', example='2023-10-18 00:00:00'),
      instanceId?: string(name='InstanceId', example='cmn-cn-7mz2mh3tj02'),
      instanceName?: string(name='InstanceName'),
      instanceOpenDate?: string(name='InstanceOpenDate', example='2023-09-18 00:00:00'),
      instanceSpec?: string(name='InstanceSpec', example='profession'),
      instanceStatus?: string(name='InstanceStatus', example='RUNNING'),
    }
  ](name='Instances'),
  requestId?: string(name='RequestId', description='Id of the request', example='23D11030-3611-5648-91A5-255A379E6ABA'),
}

model ListInstancesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListInstancesResponseBody(name='body'),
}

async function listInstancesWithOptions(runtime: Util.RuntimeOptions): ListInstancesResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListInstances',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listInstances(): ListInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listInstancesWithOptions(runtime);
}

model ListIpBlocksRequest {
  bottomNode?: boolean(name='BottomNode', example='false'),
  category?: string(name='Category', example='IPV4'),
  extAttributes?: map[string]any(name='ExtAttributes'),
  instanceId?: string(name='InstanceId', example='InstanceId'),
  ip?: string(name='Ip', example='10.0.0.0'),
  ipBlockCode?: string(name='IpBlockCode', example='10.0.0.0/8'),
  ipList?: [ string ](name='IpList'),
  leafNode?: boolean(name='LeafNode', example='false'),
  maxResults?: int32(name='MaxResults', example='50'),
  netBusiness?: string(name='NetBusiness', example='GUSET'),
  netType?: string(name='NetType', example='PRIVATE'),
  nextToken?: string(name='NextToken', example='50'),
  parentUid?: string(name='ParentUid', example='ip_block-12345aaaaabcd'),
  status?: string(name='Status', example='using'),
  subNetBusiness?: string(name='SubNetBusiness', example='static'),
  topParent?: boolean(name='TopParent', example='false'),
  treeType?: boolean(name='TreeType', example='true'),
  zoneName?: string(name='ZoneName', example='xx园区'),
}

model ListIpBlocksShrinkRequest {
  bottomNode?: boolean(name='BottomNode', example='false'),
  category?: string(name='Category', example='IPV4'),
  extAttributesShrink?: string(name='ExtAttributes'),
  instanceId?: string(name='InstanceId', example='InstanceId'),
  ip?: string(name='Ip', example='10.0.0.0'),
  ipBlockCode?: string(name='IpBlockCode', example='10.0.0.0/8'),
  ipListShrink?: string(name='IpList'),
  leafNode?: boolean(name='LeafNode', example='false'),
  maxResults?: int32(name='MaxResults', example='50'),
  netBusiness?: string(name='NetBusiness', example='GUSET'),
  netType?: string(name='NetType', example='PRIVATE'),
  nextToken?: string(name='NextToken', example='50'),
  parentUid?: string(name='ParentUid', example='ip_block-12345aaaaabcd'),
  status?: string(name='Status', example='using'),
  subNetBusiness?: string(name='SubNetBusiness', example='static'),
  topParent?: boolean(name='TopParent', example='false'),
  treeType?: boolean(name='TreeType', example='true'),
  zoneName?: string(name='ZoneName', example='xx园区'),
}

model ListIpBlocksResponseBody = {
  ipBlock?: [ 
    {
      abbr?: string(name='Abbr', example='TEST-别名'),
      application?: string(name='Application', description='IP用途', example='员工出口IP'),
      backupDeviceName?: string(name='BackupDeviceName', description='备份设备名称', example='ASW-2'),
      businessTypeId?: string(name='BusinessTypeId', description='业务类型UID', example='asdaasd'),
      businessTypeName?: string(name='BusinessTypeName', example='互联地址'),
      category?: string(name='Category', example='IPV4/IPV6'),
      description?: string(name='Description', description='备注', example='Description'),
      deviceName?: string(name='DeviceName', description='设备名称', example='ASW-1'),
      extAttributes?: map[string]any(name='ExtAttributes'),
      ipBlockCode?: string(name='IpBlockCode', example='10.0.0.0/8'),
      ipBlockId?: string(name='IpBlockId', example='adaieaoweif_s3834'),
      ipBlocks?: [ string ](name='IpBlocks'),
      isLock?: long(name='IsLock', example='0'),
      limitZoneTypes?: string(name='LimitZoneTypes', example='zone-xxx'),
      netBusiness?: string(name='NetBusiness', description='公网地址类型 INC GUEST VIP', example='INC'),
      netType?: string(name='NetType', description='公网私网标志 PUBLIC PRIVATE', example='24'),
      ownership?: string(name='Ownership', description='IP归属', example='阿里'),
      parentId?: string(name='ParentId', example='123'),
      queryIpList?: [ string ](name='QueryIpList'),
      splitRate?: double(name='SplitRate', example='0.38'),
      status?: string(name='Status', example='using'),
      subBusinessTypeName?: string(name='SubBusinessTypeName', example='商业网'),
      tasks?: [ 
        {
          domain?: string(name='Domain', example='PING-TEST'),
          gmtCreateTime?: string(name='GmtCreateTime', example='2022-11-20 11:12:43'),
          gmtModifiedTime?: string(name='GmtModifiedTime', example='2022-11-20 11:12:43'),
          ip?: string(name='Ip', example='127.0.0.1/28'),
          ipList?: [ 
            {
              devId?: string(name='DevId', example='device_xxx'),
              devName?: string(name='DevName', example='TEST'),
              ip?: string(name='Ip', example='127.0.0.1'),
              origin?: string(name='Origin', example='DOMAIN'),
              ping?: string(name='Ping', example='FAIL/OK'),
            }
          ](name='IpList'),
          msg?: string(name='Msg', example='OK'),
          status?: string(name='Status', example='OK'),
          taskId?: string(name='TaskId', example='b302f0eb-c97a-44f8-8557-320e4da7a68c'),
          totalIpCount?: long(name='TotalIpCount', example='14'),
        }
      ](name='Tasks'),
      zoneLayer?: [ 
        {
          name?: string(name='Name', description='园区层级名称', example='小型园区'),
          value?: string(name='Value', description='园区层级值', example='xx-xx'),
        }
      ](name='ZoneLayer', description='园区层级'),
      zoneName?: string(name='ZoneName', example='西溪园区'),
    }
  ](name='IpBlock'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='10'),
  requestId?: string(name='RequestId', example='RequestId'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListIpBlocksResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListIpBlocksResponseBody(name='body'),
}

async function listIpBlocksWithOptions(tmpReq: ListIpBlocksRequest, runtime: Util.RuntimeOptions): ListIpBlocksResponse {
  Util.validateModel(tmpReq);
  var request = new ListIpBlocksShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extAttributes)) {
    request.extAttributesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extAttributes, 'ExtAttributes', 'json');
  }
  if (!Util.isUnset(tmpReq.ipList)) {
    request.ipListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.ipList, 'IpList', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListIpBlocks',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listIpBlocks(request: ListIpBlocksRequest): ListIpBlocksResponse {
  var runtime = new Util.RuntimeOptions{};
  return listIpBlocksWithOptions(request, runtime);
}

model ListLinksRequest {
  deviceNameA?: string(name='DeviceNameA'),
  deviceNameB?: string(name='DeviceNameB'),
  ipA?: string(name='IpA'),
  ipB?: string(name='IpB'),
  linkName?: string(name='LinkName'),
  linkNo?: string(name='LinkNo'),
  linkStatus?: string(name='LinkStatus'),
  linkType?: string(name='LinkType'),
  maxResults?: int32(name='MaxResults'),
  nextToken?: string(name='NextToken'),
  portA?: string(name='PortA'),
  portB?: string(name='PortB'),
}

model ListLinksResponseBody = {
  content?: [ 
    {
      deviceNameA?: string(name='DeviceNameA', description='A端设备名'),
      deviceNameB?: string(name='DeviceNameB', description='B端设备名'),
      gmtCreate?: string(name='GmtCreate', description='创建时间'),
      gmtModified?: string(name='GmtModified', description='修改时间'),
      idxA?: string(name='IdxA', description='A端端口索引'),
      idxB?: string(name='IdxB', description='B端端口索引'),
      ipA?: string(name='IpA', description='A端IP'),
      ipB?: string(name='IpB', description='B端IP'),
      jobId?: string(name='JobId', description='链路发现任务'),
      linkName?: string(name='LinkName', description='链路名称'),
      linkNo?: string(name='LinkNo', description='链路编号'),
      linkStatus?: string(name='LinkStatus', description='链路状态'),
      linkType?: string(name='LinkType', description='链路类型（单端、双端）'),
      message?: string(name='Message', description='报错信息或者日志'),
      portA?: string(name='PortA', description='A端端口名'),
      portB?: string(name='PortB', description='B端端口名'),
      portDescA?: string(name='PortDescA'),
      portDescB?: string(name='PortDescB'),
      portStatusA?: string(name='PortStatusA', description='A端端口状态'),
      portStatusB?: string(name='PortStatusB', description='B端端口状态'),
      portTypeA?: string(name='PortTypeA', description='A端端口类型'),
      portTypeB?: string(name='PortTypeB', description='B端端口类型'),
      regionId?: string(name='RegionId', description='代表region的资源属性字段'),
    }
  ](name='Content'),
  nextToken?: int32(name='NextToken'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListLinksResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListLinksResponseBody(name='body'),
}

async function listLinksWithOptions(request: ListLinksRequest, runtime: Util.RuntimeOptions): ListLinksResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListLinks',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLinks(request: ListLinksRequest): ListLinksResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLinksWithOptions(request, runtime);
}

model ListLogsRequest {
  alarmStatus?: string(name='AlarmStatus', example='WARNING'),
  content?: string(name='Content', example='hostname'),
  deviceId?: string(name='DeviceId', example='device-134e3e2vf'),
  end?: long(name='End', example='1669686840'),
  instanceId?: string(name='InstanceId', example='cmn-cn-13ef013e'),
  logType?: string(name='LogType', example='SYSLOG'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  sort?: string(name='Sort', example='ReceiveTime desc'),
  start?: long(name='Start', example='1669686840'),
}

model ListLogsResponseBody = {
  logs?: [ 
    {
      alarmObject?: string(name='AlarmObject', example='card'),
      alarmStatus?: string(name='AlarmStatus', example='WARNING'),
      alarmType?: string(name='AlarmType', example='AlarmType'),
      deviceId?: string(name='DeviceId', example='device-134e3e2vf'),
      log?: string(name='Log', example='LOG'),
      receiveTime?: string(name='ReceiveTime', example='1669688743'),
      resourceDevice?: {
        hostName?: string(name='HostName', example='hostname'),
        physicalSpace?: string(name='PhysicalSpace'),
      }(name='ResourceDevice'),
      time?: string(name='Time', example='1669688743'),
    }
  ](name='Logs'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='11'),
  requestId?: string(name='RequestId', example='14180954-5B8B-5E51-B35D-1879F09B06B6'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model ListLogsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListLogsResponseBody(name='body'),
}

async function listLogsWithOptions(request: ListLogsRequest, runtime: Util.RuntimeOptions): ListLogsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListLogs',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLogs(request: ListLogsRequest): ListLogsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLogsWithOptions(request, runtime);
}

model ListMonitorDataRequest {
  aggregateDataId?: string(name='AggregateDataId', example='a-cjqd1crux50udtt0'),
  aggregationType?: string(name='AggregationType', example='5m-sum'),
  appId?: string(name='AppId', example='app-wgh09k2gam3k4ggm'),
  dataItem?: string(name='DataItem', example='avg_latency'),
  dataType?: string(name='DataType', example='SINGLE'),
  dedicatedLineId?: string(name='DedicatedLineId', example='space_isp-wgh09k2gam3k4ggm'),
  deviceId?: string(name='DeviceId', example='d-fwq29cmatva28'),
  end?: long(name='End', example='1609431000'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  key?: string(name='Key', example='in_bps'),
  monitorItemId?: string(name='MonitorItemId', example='m-52gmqniln3u53n32'),
  portCollectionId?: string(name='PortCollectionId', example='p-26dlna3ez8gejgrz'),
  start?: long(name='Start', example='1609430400'),
}

model ListMonitorDataResponseBody = {
  monitorData?: [ 
    {
      dataItem?: string(name='DataItem', example='avg_latency'),
      key?: string(name='Key', example='in_bps'),
      timestamp?: long(name='Timestamp', example='1609430460000'),
      value?: string(name='Value', example='10.1'),
    }
  ](name='MonitorData'),
  requestId?: string(name='RequestId', example='15292160-382F-46F2-B241-95EFB54BA434'),
}

model ListMonitorDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMonitorDataResponseBody(name='body'),
}

async function listMonitorDataWithOptions(request: ListMonitorDataRequest, runtime: Util.RuntimeOptions): ListMonitorDataResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListMonitorData',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMonitorData(request: ListMonitorDataRequest): ListMonitorDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMonitorDataWithOptions(request, runtime);
}

model ListNotificationHistoriesRequest {
  aggregateDataId?: string(name='AggregateDataId', example='a-52gmqniln3u53n32'),
  alarmStatus?: string(name='AlarmStatus', description='监控状态', example='WARNING'),
  appId?: string(name='AppId', description='应用ID', example='app-gh6b3a8yxtkb86yy'),
  dedicatedLineId?: string(name='DedicatedLineId', example='d-52gmqniln3u53n32'),
  deviceId?: string(name='DeviceId', example='device-jrjb476ub06'),
  end?: long(name='End', description='查询结束时间戳', example='1659930240'),
  eventItemId?: string(name='EventItemId', description='事件id', example='e-mkl2gnr3am3amlzz'),
  instanceId?: string(name='InstanceId', description='实例ID', example='cmn-cn-tl3267yvz03'),
  maxResults?: int32(name='MaxResults', example='10'),
  message?: string(name='Message', description='发送内容', example='Alarm'),
  monitorItemId?: string(name='MonitorItemId', example='m-22ut5sn54o35wsz6'),
  nextToken?: string(name='NextToken', example='1'),
  notificationGroupId?: string(name='NotificationGroupId', description='通知组id', example='n-yqqqknft7kzemgwe'),
  notificationMode?: string(name='NotificationMode', description='发送方式', example='DING_GROUP'),
  physicalSpaceId?: string(name='PhysicalSpaceId', description='物理空间ID', example='space-h47sn4e6d59n5ooh'),
  portCollectionId?: string(name='PortCollectionId', description='端口集ID', example='p-y12angok0gf881n1'),
  start?: long(name='Start', description='查询开始时间戳', example='1667797440'),
  status?: string(name='Status', description='发送状态', example='SUCCESS'),
  type?: string(name='Type', example='SINGLE'),
}

model ListNotificationHistoriesResponseBody = {
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='10'),
  notificationHistories?: [ 
    {
      aggregateDataId?: string(name='AggregateDataId', example='a-52gmqniln3u53n32'),
      alarmStatus?: string(name='AlarmStatus', description='监控状态', example='WARNING'),
      appId?: string(name='AppId', description='应用ID', example='a-52gmqniln3u53n32'),
      dedicatedLineId?: string(name='DedicatedLineId', example='d-52gmqniln3u53n32'),
      deviceId?: string(name='DeviceId', example='device-jrjb476ub06'),
      message?: string(name='Message', example='alarm content'),
      monitorItemId?: string(name='MonitorItemId', example='m-22ut5sn54o35wsz6'),
      notificationGroupId?: string(name='NotificationGroupId', example='n-22ut5sn54o35wsz6'),
      notificationGroupName?: string(name='NotificationGroupName', example='Notification Group'),
      notificationMode?: string(name='NotificationMode', example='DING_GROUP'),
      output?: string(name='Output', example='OK'),
      portCollectionId?: string(name='PortCollectionId', description='端口集ID', example='p-52gmqniln3u53n32'),
      status?: string(name='Status', example='SUCCESS'),
      time?: string(name='Time', example='2021-01-01 00:01:00'),
    }
  ](name='NotificationHistories'),
  requestId?: string(name='RequestId', description='request Id', example='AC8F05E6-AFBB-4AAE-B75E-A6539A9BAAA8'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListNotificationHistoriesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListNotificationHistoriesResponseBody(name='body'),
}

async function listNotificationHistoriesWithOptions(request: ListNotificationHistoriesRequest, runtime: Util.RuntimeOptions): ListNotificationHistoriesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListNotificationHistories',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listNotificationHistories(request: ListNotificationHistoriesRequest): ListNotificationHistoriesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listNotificationHistoriesWithOptions(request, runtime);
}

model ListNotificationHistoriesStatisticsRequest {
  end?: long(name='End', example='1609431000'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  isDedicatedLine?: boolean(name='IsDedicatedLine', example='true'),
  isDevice?: boolean(name='IsDevice', example='true'),
  isMonitorItem?: boolean(name='IsMonitorItem', example='true'),
  isPhysicalSpace?: boolean(name='IsPhysicalSpace', example='true'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-dec14rfcf1'),
  start?: long(name='Start', example='1609431000'),
  type?: string(name='Type', example='SINGLE'),
}

model ListNotificationHistoriesStatisticsResponseBody = {
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='10'),
  quota?: [ 
    {
      count?: string(name='Count', example='10'),
      mode?: string(name='Mode', example='SMS'),
      quota?: string(name='Quota', example='10'),
    }
  ](name='Quota'),
  requestId?: string(name='RequestId', description='Id of the request', example='0E47FBFF-DCF5-5636-80BD-FD67545FDD2A'),
  statistics?: [ 
    {
      count?: string(name='Count', example='10'),
      name?: string(name='Name'),
      resourceId?: string(name='ResourceId', example='space-1wedcwv13wdec'),
    }
  ](name='Statistics'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model ListNotificationHistoriesStatisticsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListNotificationHistoriesStatisticsResponseBody(name='body'),
}

async function listNotificationHistoriesStatisticsWithOptions(request: ListNotificationHistoriesStatisticsRequest, runtime: Util.RuntimeOptions): ListNotificationHistoriesStatisticsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListNotificationHistoriesStatistics',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listNotificationHistoriesStatistics(request: ListNotificationHistoriesStatisticsRequest): ListNotificationHistoriesStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listNotificationHistoriesStatisticsWithOptions(request, runtime);
}

model ListOsVersionsRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
}

model ListOsVersionsResponseBody = {
  maxResults?: long(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='1'),
  osVersion?: [ 
    {
      bootPatch?: string(name='BootPatch', example='{"name":"xxx/yyy"}'),
      createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
      featurePatch?: string(name='FeaturePatch', example='{"name":"xxx/yyy"}'),
      fileName?: string(name='FileName', description='文件名', example='zzz'),
      filePath?: string(name='FilePath', description='文件路径', example='/xxx/zzz'),
      model?: string(name='Model', description='型号', example='6510'),
      osVersion?: string(name='OsVersion', description='系统版本', example='1.0'),
      osVersionId?: string(name='OsVersionId', example='xxx_yyy'),
      status?: string(name='Status', description='状态', example='USED、UNUSED'),
      systemPatch?: string(name='SystemPatch', example='{"name":"xxx/yyy"}'),
      updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
      vendor?: string(name='Vendor', description='厂商', example='Ruijie'),
    }
  ](name='OsVersion'),
  requestId?: string(name='RequestId', example='requestId'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListOsVersionsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListOsVersionsResponseBody(name='body'),
}

async function listOsVersionsWithOptions(request: ListOsVersionsRequest, runtime: Util.RuntimeOptions): ListOsVersionsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListOsVersions',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listOsVersions(request: ListOsVersionsRequest): ListOsVersionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listOsVersionsWithOptions(request, runtime);
}

model ListPhysicalSpacesRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  physicalSpaceIds?: [ string ](name='PhysicalSpaceIds', example='1'),
  physicalSpaceName?: string(name='PhysicalSpaceName', example='阿里巴巴西溪园区'),
}

model ListPhysicalSpacesShrinkRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  physicalSpaceIdsShrink?: string(name='PhysicalSpaceIds', example='1'),
  physicalSpaceName?: string(name='PhysicalSpaceName', example='阿里巴巴西溪园区'),
}

model ListPhysicalSpacesResponseBody = {
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='11'),
  physicalSpaces?: [ 
    {
      address?: string(name='Address', example='文一西路969号'),
      city?: string(name='City', example='杭州市'),
      country?: string(name='Country', example='中国'),
      instance?: string(name='Instance', example='{}'),
      owner?: string(name='Owner', example='张三'),
      physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
      physicalSpaceName?: string(name='PhysicalSpaceName', example='阿里巴巴西溪园区'),
      province?: string(name='Province', example='浙江省'),
      remark?: string(name='Remark', example='备注'),
      securityDomainList?: [ string ](name='SecurityDomainList'),
      spaceAbbreviation?: string(name='SpaceAbbreviation', example='yq'),
      spaceType?: string(name='SpaceType', example='园区'),
    }
  ](name='PhysicalSpaces'),
  requestId?: string(name='RequestId', example='a1c7e2b4-174e-4557-a96d-d4cbf83988a6'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListPhysicalSpacesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPhysicalSpacesResponseBody(name='body'),
}

async function listPhysicalSpacesWithOptions(tmpReq: ListPhysicalSpacesRequest, runtime: Util.RuntimeOptions): ListPhysicalSpacesResponse {
  Util.validateModel(tmpReq);
  var request = new ListPhysicalSpacesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.physicalSpaceIds)) {
    request.physicalSpaceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.physicalSpaceIds, 'PhysicalSpaceIds', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPhysicalSpaces',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPhysicalSpaces(request: ListPhysicalSpacesRequest): ListPhysicalSpacesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPhysicalSpacesWithOptions(request, runtime);
}

model ListRegionsResponseBody = {
  code?: string(name='Code', example='ServiceUnavailable'),
  data?: string(name='Data'),
  message?: string(name='Message', example='The request has failed due to a temporary failure of the server.'),
  requestId?: string(name='RequestId', description='Id of the request', example='4BED6D61-2EFC-5F03-B5D1-A2AA7009523D'),
  success?: boolean(name='Success', example='True'),
}

model ListRegionsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListRegionsResponseBody(name='body'),
}

async function listRegionsWithOptions(runtime: Util.RuntimeOptions): ListRegionsResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListRegions',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listRegions(): ListRegionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listRegionsWithOptions(runtime);
}

model ListResourceInformationsRequest {
  architectureId?: string(name='ArchitectureId', example='arch_ewx'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='""'),
}

model ListResourceInformationsResponseBody = {
  maxResults?: long(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='1'),
  requestId?: string(name='RequestId', example='requestId'),
  resourceInformation?: [ 
    {
      information?: [ 
        {
          key?: string(name='Key', description='键', example='IP'),
          keyAction?: string(name='KeyAction', description='键动作', example='/xxx/zzz'),
          keyAttribute?: string(name='KeyAttribute', description='键属性', example='IP地址'),
          keyDescription?: string(name='KeyDescription', description='键描述', example='Ip地址'),
        }
      ](name='Information', description='信息'),
      resourceAttribute?: string(name='ResourceAttribute', description='资源属性', example='6510'),
      resourceInformationId?: string(name='ResourceInformationId', description='代表资源一级ID的资源属性字段'),
      resourceType?: string(name='ResourceType', description='资源类型', example='CMDB'),
    }
  ](name='ResourceInformation'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListResourceInformationsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListResourceInformationsResponseBody(name='body'),
}

async function listResourceInformationsWithOptions(request: ListResourceInformationsRequest, runtime: Util.RuntimeOptions): ListResourceInformationsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListResourceInformations',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listResourceInformations(request: ListResourceInformationsRequest): ListResourceInformationsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listResourceInformationsWithOptions(request, runtime);
}

model ListResourceInstancesRequest {
  instanceId?: string(name='InstanceId'),
  setupProjectId?: string(name='SetupProjectId', example='adaieaoweif_s3834'),
}

model ListResourceInstancesResponseBody = {
  logicResource?: [ 
    {
      keyList?: [ 
        {
          key?: string(name='Key'),
          keyAction?: string(name='KeyAction'),
          keyAttribute?: string(name='KeyAttribute'),
          keyDescription?: string(name='KeyDescription'),
          value?: string(name='Value'),
        }
      ](name='KeyList'),
      resourceAttribute?: string(name='ResourceAttribute'),
      resourceType?: string(name='ResourceType'),
    }
  ](name='LogicResource'),
  requestId?: string(name='RequestId', example='请求id'),
}

model ListResourceInstancesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListResourceInstancesResponseBody(name='body'),
}

async function listResourceInstancesWithOptions(request: ListResourceInstancesRequest, runtime: Util.RuntimeOptions): ListResourceInstancesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListResourceInstances',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listResourceInstances(request: ListResourceInstancesRequest): ListResourceInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listResourceInstancesWithOptions(request, runtime);
}

model ListResourceTypesResponseBody = {
  requestId?: string(name='RequestId'),
  resourceType?: [ 
    {
      key?: string(name='Key'),
      resourceType?: string(name='ResourceType'),
      resourceTypeName?: string(name='ResourceTypeName'),
    }
  ](name='ResourceType'),
}

model ListResourceTypesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListResourceTypesResponseBody(name='body'),
}

async function listResourceTypesWithOptions(runtime: Util.RuntimeOptions): ListResourceTypesResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'ListResourceTypes',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listResourceTypes(): ListResourceTypesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listResourceTypesWithOptions(runtime);
}

model ListSetupProjectsRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  spaceId?: string(name='SpaceId', example='spaceIdxxxyyy'),
  status?: string(name='Status', example='USED、USE'),
}

model ListSetupProjectsResponseBody = {
  maxResults?: long(name='MaxResults', example='10'),
  nextToken?: int32(name='NextToken', example='1'),
  requestId?: string(name='RequestId', example='requestId'),
  setupProject?: [ 
    {
      archVersion?: string(name='ArchVersion', description='架构id', example='xxxyyy'),
      architectureId?: string(name='ArchitectureId', example='archVersionId'),
      createTime?: string(name='CreateTime', description='代表创建时间的资源属性字段', example='2021-03-27 00:00:00'),
      deliveryTime?: string(name='DeliveryTime', description='预计交付时间', example='2021-03-27 00:00:00'),
      description?: string(name='Description', example='2021-03-27'),
      nodes?: string(name='Nodes', description='节点', example='[]'),
      packages?: [ 
        {
          deviceNumber?: long(name='DeviceNumber', description='设备号', example='1'),
          model?: string(name='Model', description='型号', example='6510'),
          role?: string(name='Role', description='角色', example='DSW'),
          vendor?: string(name='Vendor', description='厂商', example='Ruijie'),
        }
      ](name='Packages', description='套餐'),
      progress?: string(name='Progress', example='build'),
      setupProjectId?: string(name='SetupProjectId', description='代表资源一级ID的资源属性字段', example='setupProjectIdxxxyyy'),
      spaceId?: string(name='SpaceId', description='物理空间uId', example='spaceIdxxxyyy'),
      spaceName?: string(name='SpaceName', example='WHHM'),
      spaceType?: string(name='SpaceType', example='园区'),
    }
  ](name='SetupProject'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListSetupProjectsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListSetupProjectsResponseBody(name='body'),
}

async function listSetupProjectsWithOptions(request: ListSetupProjectsRequest, runtime: Util.RuntimeOptions): ListSetupProjectsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListSetupProjects',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listSetupProjects(request: ListSetupProjectsRequest): ListSetupProjectsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSetupProjectsWithOptions(request, runtime);
}

model ListSpaceModelsRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
  spaceType?: string(name='SpaceType', example='XA1-CLUSTER-1'),
  status?: string(name='Status', example='USED'),
}

model ListSpaceModelsResponseBody = {
  maxResults?: long(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken'),
  requestId?: string(name='RequestId'),
  spaceModel?: [ 
    {
      createTime?: string(name='CreateTime', example='2020-12-22 10:39:17'),
      sort?: [ 
        {
          level?: long(name='Level', example='1'),
          levelName?: string(name='LevelName', example='园区'),
        }
      ](name='Sort', description='层级'),
      spaceModelId?: string(name='SpaceModelId', description='代表资源一级ID的资源属性字段'),
      spaceType?: string(name='SpaceType', description='物理空间类型', example='xxxyyy'),
      status?: string(name='Status', example='LOCK'),
      updateTime?: string(name='UpdateTime', example='2020-12-22 10:39:17'),
    }
  ](name='SpaceModel'),
  totalCount?: int32(name='TotalCount'),
}

model ListSpaceModelsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListSpaceModelsResponseBody(name='body'),
}

async function listSpaceModelsWithOptions(request: ListSpaceModelsRequest, runtime: Util.RuntimeOptions): ListSpaceModelsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListSpaceModels',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listSpaceModels(request: ListSpaceModelsRequest): ListSpaceModelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSpaceModelsWithOptions(request, runtime);
}

model ListTasksHistoriesRequest {
  deviceId?: string(name='DeviceId', example='DEVICE-4ABE-B75E-A6539A9BAAA8'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  itemId?: string(name='ItemId', example='ITEM-4ABE-B75E-A6539A9BAAA8'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='1'),
}

model ListTasksHistoriesResponseBody = {
  inspectionTasks?: [ 
    {
      deviceDisplay?: string(name='DeviceDisplay', example='{}'),
      errorCode?: string(name='ErrorCode', example='OK'),
      executionBeginTime?: string(name='ExecutionBeginTime', example='2020-10-22 02:00:02'),
      executionEndTime?: string(name='ExecutionEndTime', example='2020-10-22 02:00:02'),
      inspectionAlarmRules?: [ 
        {
          actualValue?: string(name='ActualValue', example='11'),
          alarmExpression?: string(name='AlarmExpression', example='A>10'),
          alarmLevel?: string(name='AlarmLevel', example='warning'),
          alarmOperator?: string(name='AlarmOperator', example='>'),
          alarmValue?: string(name='AlarmValue', example='10'),
        }
      ](name='InspectionAlarmRules'),
      inspectionResult?: string(name='InspectionResult', example='{}'),
      taskId?: string(name='TaskId', example='TASK-wews-nosa'),
    }
  ](name='InspectionTasks'),
  nextToken?: int32(name='NextToken', example='1'),
  requestId?: string(name='RequestId', example='AC8F05E6-AFBB-4ABE-B75E-A6539A9BAAA8'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListTasksHistoriesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListTasksHistoriesResponseBody(name='body'),
}

async function listTasksHistoriesWithOptions(request: ListTasksHistoriesRequest, runtime: Util.RuntimeOptions): ListTasksHistoriesResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTasksHistories',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listTasksHistories(request: ListTasksHistoriesRequest): ListTasksHistoriesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTasksHistoriesWithOptions(request, runtime);
}

model ListTreePhysicalSpacesRequest {
  instanceId?: string(name='InstanceId'),
  maxResults?: string(name='MaxResults'),
  nextToken?: string(name='NextToken'),
  physicalSpaceIds?: [ string ](name='PhysicalSpaceIds'),
  physicalSpaceName?: string(name='PhysicalSpaceName'),
  tree?: boolean(name='Tree'),
}

model ListTreePhysicalSpacesShrinkRequest {
  instanceId?: string(name='InstanceId'),
  maxResults?: string(name='MaxResults'),
  nextToken?: string(name='NextToken'),
  physicalSpaceIdsShrink?: string(name='PhysicalSpaceIds'),
  physicalSpaceName?: string(name='PhysicalSpaceName'),
  tree?: boolean(name='Tree'),
}

model ListTreePhysicalSpacesResponseBody = {
  maxResults?: int32(name='MaxResults'),
  nextToken?: int32(name='NextToken'),
  physicalSpaces?: [
    PhysicalSpaceDto
  ](name='PhysicalSpaces'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListTreePhysicalSpacesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListTreePhysicalSpacesResponseBody(name='body'),
}

async function listTreePhysicalSpacesWithOptions(tmpReq: ListTreePhysicalSpacesRequest, runtime: Util.RuntimeOptions): ListTreePhysicalSpacesResponse {
  Util.validateModel(tmpReq);
  var request = new ListTreePhysicalSpacesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.physicalSpaceIds)) {
    request.physicalSpaceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.physicalSpaceIds, 'PhysicalSpaceIds', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTreePhysicalSpaces',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listTreePhysicalSpaces(request: ListTreePhysicalSpacesRequest): ListTreePhysicalSpacesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTreePhysicalSpacesWithOptions(request, runtime);
}

model LockSpaceModelRequest {
  instanceId?: string(name='InstanceId', description='instanceId', example='instanceId'),
  spaceModelId?: string(name='SpaceModelId', example='xxxyyy'),
}

model LockSpaceModelResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='requestId'),
}

model LockSpaceModelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: LockSpaceModelResponseBody(name='body'),
}

async function lockSpaceModelWithOptions(request: LockSpaceModelRequest, runtime: Util.RuntimeOptions): LockSpaceModelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.spaceModelId)) {
    query['SpaceModelId'] = request.spaceModelId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'LockSpaceModel',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function lockSpaceModel(request: LockSpaceModelRequest): LockSpaceModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return lockSpaceModelWithOptions(request, runtime);
}

model ReleaseIPRequest {
  deviceResourceId?: string(name='DeviceResourceId', example='deviceResourceId'),
  deviceResourceIds?: [ string ](name='DeviceResourceIds'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  ipType?: string(name='IpType', example='LOOPBACK_SEGMENT、INTERCONNECTION_SEGMENT  LOOPBACK、BUSINESS、  INTERCONNECTION'),
  setupProjectId?: string(name='SetupProjectId', example='xxxyyy'),
}

model ReleaseIPShrinkRequest {
  deviceResourceId?: string(name='DeviceResourceId', example='deviceResourceId'),
  deviceResourceIdsShrink?: string(name='DeviceResourceIds'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  ipType?: string(name='IpType', example='LOOPBACK_SEGMENT、INTERCONNECTION_SEGMENT  LOOPBACK、BUSINESS、  INTERCONNECTION'),
  setupProjectId?: string(name='SetupProjectId', example='xxxyyy'),
}

model ReleaseIPResponseBody = {
  requestId?: string(name='RequestId'),
}

model ReleaseIPResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ReleaseIPResponseBody(name='body'),
}

async function releaseIPWithOptions(tmpReq: ReleaseIPRequest, runtime: Util.RuntimeOptions): ReleaseIPResponse {
  Util.validateModel(tmpReq);
  var request = new ReleaseIPShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceResourceIds)) {
    request.deviceResourceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceResourceIds, 'DeviceResourceIds', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.deviceResourceId)) {
    query['DeviceResourceId'] = request.deviceResourceId;
  }
  if (!Util.isUnset(request.deviceResourceIdsShrink)) {
    query['DeviceResourceIds'] = request.deviceResourceIdsShrink;
  }
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.ipType)) {
    query['IpType'] = request.ipType;
  }
  if (!Util.isUnset(request.setupProjectId)) {
    query['SetupProjectId'] = request.setupProjectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ReleaseIP',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function releaseIP(request: ReleaseIPRequest): ReleaseIPResponse {
  var runtime = new Util.RuntimeOptions{};
  return releaseIPWithOptions(request, runtime);
}

model RetryTasksRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  retryTasks?: [ 
    {
      deviceId?: string(name='DeviceId', example='DEVICE0489b577-33b3-4991-bdc5-1cdabc1a82e2'),
      itemName?: string(name='ItemName', example='config_backup'),
      scriptId?: string(name='ScriptId', example='SCRIPT0489b577-33b3-4991-bdc5-1cdabc1a82e2'),
    }
  ](name='RetryTasks', example='RetryTasks'),
}

model RetryTasksShrinkRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  retryTasksShrink?: string(name='RetryTasks', example='RetryTasks'),
}

model RetryTasksResponseBody = {
  requestId?: string(name='RequestId', example='AC8F05E6-AFBB-4ABE-B75E-A6539A9BAAA8'),
}

model RetryTasksResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RetryTasksResponseBody(name='body'),
}

async function retryTasksWithOptions(tmpReq: RetryTasksRequest, runtime: Util.RuntimeOptions): RetryTasksResponse {
  Util.validateModel(tmpReq);
  var request = new RetryTasksShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.retryTasks)) {
    request.retryTasksShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.retryTasks, 'RetryTasks', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.retryTasksShrink)) {
    query['RetryTasks'] = request.retryTasksShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RetryTasks',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function retryTasks(request: RetryTasksRequest): RetryTasksResponse {
  var runtime = new Util.RuntimeOptions{};
  return retryTasksWithOptions(request, runtime);
}

model UpdateConfigurationSpecificationRequest {
  architecture?: string(name='Architecture', example='5.0'),
  configurationSpecificationId?: string(name='ConfigurationSpecificationId', example='kkoo'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  model?: string(name='Model', example='3601'),
  relatedVariate?: [ bytes ](name='RelatedVariate'),
  role?: string(name='Role', example='DSW'),
  specificationContent?: string(name='SpecificationContent', example='{{hostname}}'),
  specificationName?: string(name='SpecificationName', example='ConfigurationSpecificationName'),
  vendor?: string(name='Vendor', example='Alibaba'),
}

model UpdateConfigurationSpecificationShrinkRequest {
  architecture?: string(name='Architecture', example='5.0'),
  configurationSpecificationId?: string(name='ConfigurationSpecificationId', example='kkoo'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  model?: string(name='Model', example='3601'),
  relatedVariateShrink?: string(name='RelatedVariate'),
  role?: string(name='Role', example='DSW'),
  specificationContent?: string(name='SpecificationContent', example='{{hostname}}'),
  specificationName?: string(name='SpecificationName', example='ConfigurationSpecificationName'),
  vendor?: string(name='Vendor', example='Alibaba'),
}

model UpdateConfigurationSpecificationResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
}

model UpdateConfigurationSpecificationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateConfigurationSpecificationResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param tmpReq UpdateConfigurationSpecificationRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return UpdateConfigurationSpecificationResponse
 */
// Deprecated
async function updateConfigurationSpecificationWithOptions(tmpReq: UpdateConfigurationSpecificationRequest, runtime: Util.RuntimeOptions): UpdateConfigurationSpecificationResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateConfigurationSpecificationShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.relatedVariate)) {
    request.relatedVariateShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.relatedVariate, 'RelatedVariate', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.architecture)) {
    body['Architecture'] = request.architecture;
  }
  if (!Util.isUnset(request.configurationSpecificationId)) {
    body['ConfigurationSpecificationId'] = request.configurationSpecificationId;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.relatedVariateShrink)) {
    body['RelatedVariate'] = request.relatedVariateShrink;
  }
  if (!Util.isUnset(request.role)) {
    body['Role'] = request.role;
  }
  if (!Util.isUnset(request.specificationContent)) {
    body['SpecificationContent'] = request.specificationContent;
  }
  if (!Util.isUnset(request.specificationName)) {
    body['SpecificationName'] = request.specificationName;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateConfigurationSpecification',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request UpdateConfigurationSpecificationRequest
  * @return UpdateConfigurationSpecificationResponse
 */
// Deprecated
async function updateConfigurationSpecification(request: UpdateConfigurationSpecificationRequest): UpdateConfigurationSpecificationResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateConfigurationSpecificationWithOptions(request, runtime);
}

model UpdateConfigurationVariateRequest {
  comment?: string(name='Comment', example='项目变量'),
  configurationVariateId?: string(name='ConfigurationVariateId', description='代表资源一级ID的资源属性字段', example='configurationVariateIdxxxyyy'),
  formatFunction?: string(name='FormatFunction', example='def main():'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  variateName?: string(name='VariateName', example='project'),
}

model UpdateConfigurationVariateResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
}

model UpdateConfigurationVariateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateConfigurationVariateResponseBody(name='body'),
}

async function updateConfigurationVariateWithOptions(request: UpdateConfigurationVariateRequest, runtime: Util.RuntimeOptions): UpdateConfigurationVariateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.comment)) {
    body['Comment'] = request.comment;
  }
  if (!Util.isUnset(request.configurationVariateId)) {
    body['ConfigurationVariateId'] = request.configurationVariateId;
  }
  if (!Util.isUnset(request.formatFunction)) {
    body['FormatFunction'] = request.formatFunction;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.variateName)) {
    body['VariateName'] = request.variateName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateConfigurationVariate',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateConfigurationVariate(request: UpdateConfigurationVariateRequest): UpdateConfigurationVariateResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateConfigurationVariateWithOptions(request, runtime);
}

model UpdateDedicatedLineRequest {
  bandwidth?: int32(name='Bandwidth', example='100'),
  contact?: string(name='Contact', example='zs'),
  dedicatedLineGateway?: string(name='DedicatedLineGateway', example='111.111.xxx.xxx'),
  dedicatedLineId?: string(name='DedicatedLineId', example='space_isp-6dk5xpoyoopr6obf'),
  dedicatedLineIp?: string(name='DedicatedLineIp', example='111.111.xxx.xxx'),
  dedicatedLineRole?: string(name='DedicatedLineRole', example='主'),
  description?: string(name='Description', example='备注'),
  deviceId?: string(name='DeviceId', example='device-evve560juend5owh'),
  devicePort?: string(name='DevicePort', example='GigabitEthernet1/0/0'),
  expirationDate?: string(name='ExpirationDate', example='2022-06-14 04:00:00'),
  extAttributes?: string(name='ExtAttributes', example='{"Location":"cdc"}'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  isp?: string(name='Isp', example='电信'),
  ispId?: string(name='IspId', example='isp-dhyw2lxfpcs80d9'),
  keyword?: string(name='Keyword', example='测试专线'),
  onlineDate?: string(name='OnlineDate', example='2022-06-13 12:00:00'),
  phone?: string(name='Phone', example='133xxxxxxxx'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
}

model UpdateDedicatedLineResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='8de935f6-90c7-444e-a2b4-bb4185153435'),
}

model UpdateDedicatedLineResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDedicatedLineResponseBody(name='body'),
}

async function updateDedicatedLineWithOptions(request: UpdateDedicatedLineRequest, runtime: Util.RuntimeOptions): UpdateDedicatedLineResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bandwidth)) {
    body['Bandwidth'] = request.bandwidth;
  }
  if (!Util.isUnset(request.contact)) {
    body['Contact'] = request.contact;
  }
  if (!Util.isUnset(request.dedicatedLineGateway)) {
    body['DedicatedLineGateway'] = request.dedicatedLineGateway;
  }
  if (!Util.isUnset(request.dedicatedLineId)) {
    body['DedicatedLineId'] = request.dedicatedLineId;
  }
  if (!Util.isUnset(request.dedicatedLineIp)) {
    body['DedicatedLineIp'] = request.dedicatedLineIp;
  }
  if (!Util.isUnset(request.dedicatedLineRole)) {
    body['DedicatedLineRole'] = request.dedicatedLineRole;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.devicePort)) {
    body['DevicePort'] = request.devicePort;
  }
  if (!Util.isUnset(request.expirationDate)) {
    body['ExpirationDate'] = request.expirationDate;
  }
  if (!Util.isUnset(request.extAttributes)) {
    body['ExtAttributes'] = request.extAttributes;
  }
  if (!Util.isUnset(request.isp)) {
    body['Isp'] = request.isp;
  }
  if (!Util.isUnset(request.ispId)) {
    body['IspId'] = request.ispId;
  }
  if (!Util.isUnset(request.keyword)) {
    body['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.onlineDate)) {
    body['OnlineDate'] = request.onlineDate;
  }
  if (!Util.isUnset(request.phone)) {
    body['Phone'] = request.phone;
  }
  if (!Util.isUnset(request.physicalSpaceId)) {
    body['PhysicalSpaceId'] = request.physicalSpaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDedicatedLine',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDedicatedLine(request: UpdateDedicatedLineRequest): UpdateDedicatedLineResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDedicatedLineWithOptions(request, runtime);
}

model UpdateDeviceRequest {
  deviceId?: string(name='DeviceId', description='设备ID', example='device-evve560juend5owh'),
  enablePassword?: string(name='EnablePassword', description='enable密码', example='pass***'),
  extAttributes?: string(name='ExtAttributes', description='设备额外属性(JSON)', example='{"role":"ASW"}'),
  hostName?: string(name='HostName', description='主机名', example='HZYT_USG6620_A'),
  instanceId?: string(name='InstanceId', description='实例ID', example='cmn-cn-xxx'),
  ip?: string(name='Ip', description='设备IP', example='10.17.101.1'),
  loginPassword?: string(name='LoginPassword', description='设备TELNET账号', example='123456'),
  loginType?: string(name='LoginType', description='设备SSH登录账号', example='SSH,TELNET'),
  loginUsername?: string(name='LoginUsername', description='设备SSH登录密码', example='admin'),
  mac?: string(name='Mac', description='设备MAC地址', example='b8:27:eb:34:3b:a2'),
  model?: string(name='Model', description='设备型号', example='USG6620'),
  physicalSpaceId?: string(name='PhysicalSpaceId', description='物理空间', example='space-ez6zd3w68ma4fsd4'),
  securityDomain?: string(name='SecurityDomain', description='设备安全域', example='IT'),
  serviceStatus?: string(name='ServiceStatus', description='设备状态', example='online'),
  sn?: string(name='Sn', description='设备SN', example='210235951910K7000016'),
  snmpAccountType?: string(name='SnmpAccountType', description='账号类型', example='get'),
  snmpAccountVersion?: string(name='SnmpAccountVersion', description='SNMP版本号', example='v3'),
  snmpAuthPassphrase?: string(name='SnmpAuthPassphrase', description='SNMP Auth PassPhrase', example='123456'),
  snmpAuthProtocol?: string(name='SnmpAuthProtocol', description='Auth Protocol', example='MD5'),
  snmpCommunity?: string(name='SnmpCommunity', description='SNMP Community', example='123456'),
  snmpPrivacyPassphrase?: string(name='SnmpPrivacyPassphrase', description='SNMP Privacy Passphrase', example='pass***'),
  snmpPrivacyProtocol?: string(name='SnmpPrivacyProtocol', description='Privacy Protocol', example='DES'),
  snmpSecurityLevel?: string(name='SnmpSecurityLevel', description='安全级别', example='AUTH_PRIV'),
  snmpUsername?: string(name='SnmpUsername', description='用户名', example='admin'),
  vendor?: string(name='Vendor', description='设备厂商', example='Huawei'),
}

model UpdateDeviceResponseBody = {
  requestId?: string(name='RequestId', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
}

model UpdateDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDeviceResponseBody(name='body'),
}

async function updateDeviceWithOptions(request: UpdateDeviceRequest, runtime: Util.RuntimeOptions): UpdateDeviceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.enablePassword)) {
    body['EnablePassword'] = request.enablePassword;
  }
  if (!Util.isUnset(request.extAttributes)) {
    body['ExtAttributes'] = request.extAttributes;
  }
  if (!Util.isUnset(request.hostName)) {
    body['HostName'] = request.hostName;
  }
  if (!Util.isUnset(request.ip)) {
    body['Ip'] = request.ip;
  }
  if (!Util.isUnset(request.loginPassword)) {
    body['LoginPassword'] = request.loginPassword;
  }
  if (!Util.isUnset(request.loginType)) {
    body['LoginType'] = request.loginType;
  }
  if (!Util.isUnset(request.loginUsername)) {
    body['LoginUsername'] = request.loginUsername;
  }
  if (!Util.isUnset(request.mac)) {
    body['Mac'] = request.mac;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.physicalSpaceId)) {
    body['PhysicalSpaceId'] = request.physicalSpaceId;
  }
  if (!Util.isUnset(request.securityDomain)) {
    body['SecurityDomain'] = request.securityDomain;
  }
  if (!Util.isUnset(request.serviceStatus)) {
    body['ServiceStatus'] = request.serviceStatus;
  }
  if (!Util.isUnset(request.sn)) {
    body['Sn'] = request.sn;
  }
  if (!Util.isUnset(request.snmpAccountType)) {
    body['SnmpAccountType'] = request.snmpAccountType;
  }
  if (!Util.isUnset(request.snmpAccountVersion)) {
    body['SnmpAccountVersion'] = request.snmpAccountVersion;
  }
  if (!Util.isUnset(request.snmpAuthPassphrase)) {
    body['SnmpAuthPassphrase'] = request.snmpAuthPassphrase;
  }
  if (!Util.isUnset(request.snmpAuthProtocol)) {
    body['SnmpAuthProtocol'] = request.snmpAuthProtocol;
  }
  if (!Util.isUnset(request.snmpCommunity)) {
    body['SnmpCommunity'] = request.snmpCommunity;
  }
  if (!Util.isUnset(request.snmpPrivacyPassphrase)) {
    body['SnmpPrivacyPassphrase'] = request.snmpPrivacyPassphrase;
  }
  if (!Util.isUnset(request.snmpPrivacyProtocol)) {
    body['SnmpPrivacyProtocol'] = request.snmpPrivacyProtocol;
  }
  if (!Util.isUnset(request.snmpSecurityLevel)) {
    body['SnmpSecurityLevel'] = request.snmpSecurityLevel;
  }
  if (!Util.isUnset(request.snmpUsername)) {
    body['SnmpUsername'] = request.snmpUsername;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDevice',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDevice(request: UpdateDeviceRequest): UpdateDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDeviceWithOptions(request, runtime);
}

model UpdateDeviceFormRequest {
  accountConfig?: boolean(name='AccountConfig', description='是否需要账号配置', example='true'),
  attributeList?: [ 
    {
      attributeFormat?: string(name='AttributeFormat', description='设备形态属性值格式', example='STRING'),
      attributeFuzzyQuery?: boolean(name='AttributeFuzzyQuery', example='false'),
      attributeKey?: string(name='AttributeKey', description='设备形态属性主键', example='serviceStatus'),
      attributeName?: string(name='AttributeName', description='设备形态属性名称', example='服务状态'),
      attributePlaceholder?: string(name='AttributePlaceholder', description='前端查询控件占位符', example='前端占位符说明'),
      attributeQuery?: boolean(name='AttributeQuery', example='false'),
      attributeReference?: string(name='AttributeReference', description='设备形态属性关联对象', example='status'),
      attributeRequirement?: boolean(name='AttributeRequirement', description='设备形态属性是否必填', example='true'),
      attributeSequence?: int32(name='AttributeSequence', example='1'),
      attributeTableDisplay?: boolean(name='AttributeTableDisplay', description='设备形态属性是否表格可见', example='服务状态'),
      attributeType?: string(name='AttributeType', description='设备形态属性值类型', example='ENUMS'),
      attributeUniqueness?: boolean(name='AttributeUniqueness', description='设备形态属性是否唯一', example='false'),
    }
  ](name='AttributeList', description='设备形态属性列表', example='true'),
  configCompare?: boolean(name='ConfigCompare', description='是否支持配置生成', example='true'),
  detailDisplay?: boolean(name='DetailDisplay', example='true'),
  deviceFormId?: string(name='DeviceFormId', description='设备形态ID', example='form-u4ilnhu64h026lrf'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  relatedDeviceFormId?: string(name='RelatedDeviceFormId', example='form-4gnk12c2pdp4qu42'),
  script?: string(name='Script', example='@login_device\\r\\ndef config_backup():\\r\\n    exec_cli(\\"show license\\", timeout=120)\\r\\n    return exec_cli(\\"show config\\", timeout=180)'),
}

model UpdateDeviceFormShrinkRequest {
  accountConfig?: boolean(name='AccountConfig', description='是否需要账号配置', example='true'),
  attributeListShrink?: string(name='AttributeList', description='设备形态属性列表', example='true'),
  configCompare?: boolean(name='ConfigCompare', description='是否支持配置生成', example='true'),
  detailDisplay?: boolean(name='DetailDisplay', example='true'),
  deviceFormId?: string(name='DeviceFormId', description='设备形态ID', example='form-u4ilnhu64h026lrf'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  relatedDeviceFormId?: string(name='RelatedDeviceFormId', example='form-4gnk12c2pdp4qu42'),
  script?: string(name='Script', example='@login_device\\r\\ndef config_backup():\\r\\n    exec_cli(\\"show license\\", timeout=120)\\r\\n    return exec_cli(\\"show config\\", timeout=180)'),
}

model UpdateDeviceFormResponseBody = {
  requestId?: string(name='RequestId', example='15292160-382F-46F2-B241-95EFB54BA434'),
}

model UpdateDeviceFormResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDeviceFormResponseBody(name='body'),
}

async function updateDeviceFormWithOptions(tmpReq: UpdateDeviceFormRequest, runtime: Util.RuntimeOptions): UpdateDeviceFormResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateDeviceFormShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.attributeList)) {
    request.attributeListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.attributeList, 'AttributeList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.accountConfig)) {
    body['AccountConfig'] = request.accountConfig;
  }
  if (!Util.isUnset(request.attributeListShrink)) {
    body['AttributeList'] = request.attributeListShrink;
  }
  if (!Util.isUnset(request.configCompare)) {
    body['ConfigCompare'] = request.configCompare;
  }
  if (!Util.isUnset(request.detailDisplay)) {
    body['DetailDisplay'] = request.detailDisplay;
  }
  if (!Util.isUnset(request.deviceFormId)) {
    body['DeviceFormId'] = request.deviceFormId;
  }
  if (!Util.isUnset(request.relatedDeviceFormId)) {
    body['RelatedDeviceFormId'] = request.relatedDeviceFormId;
  }
  if (!Util.isUnset(request.script)) {
    body['Script'] = request.script;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDeviceForm',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDeviceForm(request: UpdateDeviceFormRequest): UpdateDeviceFormResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDeviceFormWithOptions(request, runtime);
}

model UpdateDevicePropertyRequest {
  devicePropertyId?: string(name='DevicePropertyId', example='property-z50wex75a1lkx7vx'),
  instanceId?: string(name='InstanceId', description='实例ID', example='cmn-cn-xxx'),
  propertyContent?: string(name='PropertyContent', example='{   "H3C": [     "H3C S6800",     "S6850-56HF"   ],   "Huawei": [     "CE6851-48S6Q"   ] }'),
  propertyFormat?: string(name='PropertyFormat', example='JSON'),
  propertyName?: string(name='PropertyName', example='厂商型号'),
}

model UpdateDevicePropertyResponseBody = {
  requestId?: string(name='RequestId', example='1f598491-db6d-4276-a83a-3b5f57d4a4e1'),
}

model UpdateDevicePropertyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDevicePropertyResponseBody(name='body'),
}

async function updateDevicePropertyWithOptions(request: UpdateDevicePropertyRequest, runtime: Util.RuntimeOptions): UpdateDevicePropertyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.devicePropertyId)) {
    body['DevicePropertyId'] = request.devicePropertyId;
  }
  if (!Util.isUnset(request.propertyContent)) {
    body['PropertyContent'] = request.propertyContent;
  }
  if (!Util.isUnset(request.propertyFormat)) {
    body['PropertyFormat'] = request.propertyFormat;
  }
  if (!Util.isUnset(request.propertyName)) {
    body['PropertyName'] = request.propertyName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDeviceProperty',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDeviceProperty(request: UpdateDevicePropertyRequest): UpdateDevicePropertyResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDevicePropertyWithOptions(request, runtime);
}

model UpdateDeviceResourceRequest {
  data?: string(name='Data', description='更新数据', example='zzz'),
  deviceResourceId?: string(name='DeviceResourceId', example='deviceResourceId'),
  deviceResourceIds?: [ string ](name='DeviceResourceIds', description='代表资源一级ID的资源属性字段'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  setupProjectId?: string(name='SetupProjectId', description='建设项目id', example='xxx_zzz'),
  updateType?: string(name='UpdateType', description='操作类型', example='LOCATION、HOSTNAME、IP_ADDRESS、  CONFIGURATION_GENERATOR'),
}

model UpdateDeviceResourceShrinkRequest {
  data?: string(name='Data', description='更新数据', example='zzz'),
  deviceResourceId?: string(name='DeviceResourceId', example='deviceResourceId'),
  deviceResourceIdsShrink?: string(name='DeviceResourceIds', description='代表资源一级ID的资源属性字段'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  setupProjectId?: string(name='SetupProjectId', description='建设项目id', example='xxx_zzz'),
  updateType?: string(name='UpdateType', description='操作类型', example='LOCATION、HOSTNAME、IP_ADDRESS、  CONFIGURATION_GENERATOR'),
}

model UpdateDeviceResourceResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateDeviceResourceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDeviceResourceResponseBody(name='body'),
}

async function updateDeviceResourceWithOptions(tmpReq: UpdateDeviceResourceRequest, runtime: Util.RuntimeOptions): UpdateDeviceResourceResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateDeviceResourceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceResourceIds)) {
    request.deviceResourceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceResourceIds, 'DeviceResourceIds', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  if (!Util.isUnset(request.deviceResourceId)) {
    body['DeviceResourceId'] = request.deviceResourceId;
  }
  if (!Util.isUnset(request.deviceResourceIdsShrink)) {
    body['DeviceResourceIds'] = request.deviceResourceIdsShrink;
  }
  if (!Util.isUnset(request.setupProjectId)) {
    body['SetupProjectId'] = request.setupProjectId;
  }
  if (!Util.isUnset(request.updateType)) {
    body['UpdateType'] = request.updateType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDeviceResource',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDeviceResource(request: UpdateDeviceResourceRequest): UpdateDeviceResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDeviceResourceWithOptions(request, runtime);
}

model UpdateDevicesRequest {
  deviceIds?: [ string ](name='DeviceIds', description='设备ID', example='UpdateDevices'),
  enablePassword?: string(name='EnablePassword', example='123456'),
  extAttributes?: string(name='ExtAttributes', example='{\\"Role\\":\\"WIFI-ASW\\"}'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  loginPassword?: string(name='LoginPassword', description='设备TELNET账号', example='123456'),
  loginType?: string(name='LoginType', description='设备SSH登录账号', example='SSH,TELNET'),
  loginUsername?: string(name='LoginUsername', description='设备SSH登录密码', example='admin'),
  model?: string(name='Model', example='RG-S5750-48GT4XS-HP-H'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-1hk5p29yvvzuh9cp'),
  physicalSpaceName?: string(name='PhysicalSpaceName', example='xxx园区'),
  securityDomain?: string(name='SecurityDomain', example='CMN-IT'),
  serviceStatus?: string(name='ServiceStatus', example='online'),
  snmpAccountType?: string(name='SnmpAccountType', description='账号类型', example='get'),
  snmpAccountVersion?: string(name='SnmpAccountVersion', description='SNMP版本号', example='v3'),
  snmpAuthPassphrase?: string(name='SnmpAuthPassphrase', description='Auth PassPhrase', example='123456'),
  snmpAuthProtocol?: string(name='SnmpAuthProtocol', example='MD5'),
  snmpCommunity?: string(name='SnmpCommunity', description='Community', example='123456'),
  snmpPrivacyPassphrase?: string(name='SnmpPrivacyPassphrase', description='Privacy Passphase', example='123456'),
  snmpPrivacyProtocol?: string(name='SnmpPrivacyProtocol', description='Privacy Protocol', example='DES'),
  snmpSecurityLevel?: string(name='SnmpSecurityLevel', description='安全级别', example='AUTH_PRIV'),
  snmpUsername?: string(name='SnmpUsername', description='用户名', example='admin'),
  vendor?: string(name='Vendor', example='H3C'),
}

model UpdateDevicesShrinkRequest {
  deviceIdsShrink?: string(name='DeviceIds', description='设备ID', example='UpdateDevices'),
  enablePassword?: string(name='EnablePassword', example='123456'),
  extAttributes?: string(name='ExtAttributes', example='{\\"Role\\":\\"WIFI-ASW\\"}'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxx'),
  loginPassword?: string(name='LoginPassword', description='设备TELNET账号', example='123456'),
  loginType?: string(name='LoginType', description='设备SSH登录账号', example='SSH,TELNET'),
  loginUsername?: string(name='LoginUsername', description='设备SSH登录密码', example='admin'),
  model?: string(name='Model', example='RG-S5750-48GT4XS-HP-H'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-1hk5p29yvvzuh9cp'),
  physicalSpaceName?: string(name='PhysicalSpaceName', example='xxx园区'),
  securityDomain?: string(name='SecurityDomain', example='CMN-IT'),
  serviceStatus?: string(name='ServiceStatus', example='online'),
  snmpAccountType?: string(name='SnmpAccountType', description='账号类型', example='get'),
  snmpAccountVersion?: string(name='SnmpAccountVersion', description='SNMP版本号', example='v3'),
  snmpAuthPassphrase?: string(name='SnmpAuthPassphrase', description='Auth PassPhrase', example='123456'),
  snmpAuthProtocol?: string(name='SnmpAuthProtocol', example='MD5'),
  snmpCommunity?: string(name='SnmpCommunity', description='Community', example='123456'),
  snmpPrivacyPassphrase?: string(name='SnmpPrivacyPassphrase', description='Privacy Passphase', example='123456'),
  snmpPrivacyProtocol?: string(name='SnmpPrivacyProtocol', description='Privacy Protocol', example='DES'),
  snmpSecurityLevel?: string(name='SnmpSecurityLevel', description='安全级别', example='AUTH_PRIV'),
  snmpUsername?: string(name='SnmpUsername', description='用户名', example='admin'),
  vendor?: string(name='Vendor', example='H3C'),
}

model UpdateDevicesResponseBody = {
  requestId?: string(name='RequestId', example='fdb2af01-bd56-4034-812b-f257f73b4690'),
}

model UpdateDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDevicesResponseBody(name='body'),
}

async function updateDevicesWithOptions(tmpReq: UpdateDevicesRequest, runtime: Util.RuntimeOptions): UpdateDevicesResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateDevicesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceIds)) {
    request.deviceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceIds, 'DeviceIds', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceIdsShrink)) {
    body['DeviceIds'] = request.deviceIdsShrink;
  }
  if (!Util.isUnset(request.enablePassword)) {
    body['EnablePassword'] = request.enablePassword;
  }
  if (!Util.isUnset(request.extAttributes)) {
    body['ExtAttributes'] = request.extAttributes;
  }
  if (!Util.isUnset(request.loginPassword)) {
    body['LoginPassword'] = request.loginPassword;
  }
  if (!Util.isUnset(request.loginType)) {
    body['LoginType'] = request.loginType;
  }
  if (!Util.isUnset(request.loginUsername)) {
    body['LoginUsername'] = request.loginUsername;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.physicalSpaceId)) {
    body['PhysicalSpaceId'] = request.physicalSpaceId;
  }
  if (!Util.isUnset(request.physicalSpaceName)) {
    body['PhysicalSpaceName'] = request.physicalSpaceName;
  }
  if (!Util.isUnset(request.securityDomain)) {
    body['SecurityDomain'] = request.securityDomain;
  }
  if (!Util.isUnset(request.serviceStatus)) {
    body['ServiceStatus'] = request.serviceStatus;
  }
  if (!Util.isUnset(request.snmpAccountType)) {
    body['SnmpAccountType'] = request.snmpAccountType;
  }
  if (!Util.isUnset(request.snmpAccountVersion)) {
    body['SnmpAccountVersion'] = request.snmpAccountVersion;
  }
  if (!Util.isUnset(request.snmpAuthPassphrase)) {
    body['SnmpAuthPassphrase'] = request.snmpAuthPassphrase;
  }
  if (!Util.isUnset(request.snmpAuthProtocol)) {
    body['SnmpAuthProtocol'] = request.snmpAuthProtocol;
  }
  if (!Util.isUnset(request.snmpCommunity)) {
    body['SnmpCommunity'] = request.snmpCommunity;
  }
  if (!Util.isUnset(request.snmpPrivacyPassphrase)) {
    body['SnmpPrivacyPassphrase'] = request.snmpPrivacyPassphrase;
  }
  if (!Util.isUnset(request.snmpPrivacyProtocol)) {
    body['SnmpPrivacyProtocol'] = request.snmpPrivacyProtocol;
  }
  if (!Util.isUnset(request.snmpSecurityLevel)) {
    body['SnmpSecurityLevel'] = request.snmpSecurityLevel;
  }
  if (!Util.isUnset(request.snmpUsername)) {
    body['SnmpUsername'] = request.snmpUsername;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDevices',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDevices(request: UpdateDevicesRequest): UpdateDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDevicesWithOptions(request, runtime);
}

model UpdateEventDefinitionRequest {
  eventId?: string(name='EventId', example='e-1dcscicdv'),
  eventName?: string(name='EventName', example='探针掉线事件'),
  eventType?: string(name='EventType', example='AGENT_EVENT'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxxx'),
  templateId?: string(name='TemplateId'),
}

model UpdateEventDefinitionResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateEventDefinitionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateEventDefinitionResponseBody(name='body'),
}

async function updateEventDefinitionWithOptions(request: UpdateEventDefinitionRequest, runtime: Util.RuntimeOptions): UpdateEventDefinitionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.eventId)) {
    body['EventId'] = request.eventId;
  }
  if (!Util.isUnset(request.eventName)) {
    body['EventName'] = request.eventName;
  }
  if (!Util.isUnset(request.eventType)) {
    body['EventType'] = request.eventType;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.templateId)) {
    body['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateEventDefinition',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateEventDefinition(request: UpdateEventDefinitionRequest): UpdateEventDefinitionResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateEventDefinitionWithOptions(request, runtime);
}

model UpdateInformationKeyActionRequest {
  instanceId?: string(name='InstanceId'),
  key?: string(name='Key', example='ip'),
  keyAction?: string(name='KeyAction', example='AGENT_SYNC'),
  resourceInformationId?: string(name='ResourceInformationId'),
  setupProjectId?: string(name='SetupProjectId', example='adaieaoweif_s3834'),
  value?: string(name='Value', example='192.168.1.1'),
}

model UpdateInformationKeyActionResponseBody = {
  actionMessage?: string(name='ActionMessage', example='alsoeqwe'),
  requestId?: string(name='RequestId'),
}

model UpdateInformationKeyActionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateInformationKeyActionResponseBody(name='body'),
}

async function updateInformationKeyActionWithOptions(request: UpdateInformationKeyActionRequest, runtime: Util.RuntimeOptions): UpdateInformationKeyActionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.keyAction)) {
    query['KeyAction'] = request.keyAction;
  }
  if (!Util.isUnset(request.resourceInformationId)) {
    query['ResourceInformationId'] = request.resourceInformationId;
  }
  if (!Util.isUnset(request.setupProjectId)) {
    query['SetupProjectId'] = request.setupProjectId;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateInformationKeyAction',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateInformationKeyAction(request: UpdateInformationKeyActionRequest): UpdateInformationKeyActionResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateInformationKeyActionWithOptions(request, runtime);
}

model UpdateInstanceRequest {
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  instanceName?: string(name='InstanceName'),
}

model UpdateInstanceResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='AF24AC56-C4C0-5494-92E8-0B71BE4B3CCA'),
}

model UpdateInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateInstanceResponseBody(name='body'),
}

async function updateInstanceWithOptions(request: UpdateInstanceRequest, runtime: Util.RuntimeOptions): UpdateInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.instanceName)) {
    body['InstanceName'] = request.instanceName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateInstance',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateInstance(request: UpdateInstanceRequest): UpdateInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateInstanceWithOptions(request, runtime);
}

model UpdateOsVersionRequest {
  bootPatch?: string(name='BootPatch', example='{"name":"xxx/yyy"}'),
  featurePatch?: string(name='FeaturePatch', example='{"name":"xxx/yyy"}'),
  fileName?: string(name='FileName', description='文件名', example='zzz'),
  filePath?: string(name='FilePath', description='文件路径', example='/xxx/zzz'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  model?: string(name='Model', description='型号', example='6510'),
  osVersion?: string(name='OsVersion', description='系统版本', example='1.0'),
  osVersionId?: string(name='OsVersionId', example='osVersionId'),
  status?: string(name='Status', description='状态', example='USED、UNUSED'),
  systemPatch?: string(name='SystemPatch', example='{"name":"xxx/yyy"}'),
  vendor?: string(name='Vendor', description='厂商', example='Ruijie'),
}

model UpdateOsVersionResponseBody = {
  requestId?: string(name='RequestId', example='kkrr'),
}

model UpdateOsVersionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateOsVersionResponseBody(name='body'),
}

async function updateOsVersionWithOptions(request: UpdateOsVersionRequest, runtime: Util.RuntimeOptions): UpdateOsVersionResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bootPatch)) {
    body['BootPatch'] = request.bootPatch;
  }
  if (!Util.isUnset(request.featurePatch)) {
    body['FeaturePatch'] = request.featurePatch;
  }
  if (!Util.isUnset(request.fileName)) {
    body['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.filePath)) {
    body['FilePath'] = request.filePath;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.model)) {
    body['Model'] = request.model;
  }
  if (!Util.isUnset(request.osVersion)) {
    body['OsVersion'] = request.osVersion;
  }
  if (!Util.isUnset(request.osVersionId)) {
    body['OsVersionId'] = request.osVersionId;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  if (!Util.isUnset(request.systemPatch)) {
    body['SystemPatch'] = request.systemPatch;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateOsVersion',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateOsVersion(request: UpdateOsVersionRequest): UpdateOsVersionResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateOsVersionWithOptions(request, runtime);
}

model UpdatePhysicalSpaceRequest {
  address?: string(name='Address', example='文一西路969号'),
  city?: string(name='City', example='杭州市'),
  country?: string(name='Country', example='中国'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  moveAction?: string(name='MoveAction', example='BEFORE'),
  owner?: string(name='Owner', example='张三'),
  parentUid?: string(name='ParentUid', example='space-twnepeeloclxxxxx'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
  physicalSpaceName?: string(name='PhysicalSpaceName', example='阿里巴巴西溪园区'),
  province?: string(name='Province', example='浙江省'),
  remark?: string(name='Remark', example='备注'),
  securityDomainList?: [ string ](name='SecurityDomainList'),
  spaceAbbreviation?: string(name='SpaceAbbreviation', example='yq'),
  spaceType?: string(name='SpaceType', example='园区'),
  targetUid?: string(name='TargetUid', example='space-twnepee1234xxxxx'),
}

model UpdatePhysicalSpaceShrinkRequest {
  address?: string(name='Address', example='文一西路969号'),
  city?: string(name='City', example='杭州市'),
  country?: string(name='Country', example='中国'),
  instanceId?: string(name='InstanceId', example='cmn-cn-xxxx'),
  moveAction?: string(name='MoveAction', example='BEFORE'),
  owner?: string(name='Owner', example='张三'),
  parentUid?: string(name='ParentUid', example='space-twnepeeloclxxxxx'),
  physicalSpaceId?: string(name='PhysicalSpaceId', example='space-ez6zd3w68ma4fsd4'),
  physicalSpaceName?: string(name='PhysicalSpaceName', example='阿里巴巴西溪园区'),
  province?: string(name='Province', example='浙江省'),
  remark?: string(name='Remark', example='备注'),
  securityDomainListShrink?: string(name='SecurityDomainList'),
  spaceAbbreviation?: string(name='SpaceAbbreviation', example='yq'),
  spaceType?: string(name='SpaceType', example='园区'),
  targetUid?: string(name='TargetUid', example='space-twnepee1234xxxxx'),
}

model UpdatePhysicalSpaceResponseBody = {
  requestId?: string(name='RequestId', example='a1c7e2b4-174e-4557-a96d-d4cbf83988a6'),
}

model UpdatePhysicalSpaceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdatePhysicalSpaceResponseBody(name='body'),
}

async function updatePhysicalSpaceWithOptions(tmpReq: UpdatePhysicalSpaceRequest, runtime: Util.RuntimeOptions): UpdatePhysicalSpaceResponse {
  Util.validateModel(tmpReq);
  var request = new UpdatePhysicalSpaceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.securityDomainList)) {
    request.securityDomainListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.securityDomainList, 'SecurityDomainList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.address)) {
    body['Address'] = request.address;
  }
  if (!Util.isUnset(request.city)) {
    body['City'] = request.city;
  }
  if (!Util.isUnset(request.country)) {
    body['Country'] = request.country;
  }
  if (!Util.isUnset(request.moveAction)) {
    body['MoveAction'] = request.moveAction;
  }
  if (!Util.isUnset(request.owner)) {
    body['Owner'] = request.owner;
  }
  if (!Util.isUnset(request.parentUid)) {
    body['ParentUid'] = request.parentUid;
  }
  if (!Util.isUnset(request.physicalSpaceId)) {
    body['PhysicalSpaceId'] = request.physicalSpaceId;
  }
  if (!Util.isUnset(request.physicalSpaceName)) {
    body['PhysicalSpaceName'] = request.physicalSpaceName;
  }
  if (!Util.isUnset(request.province)) {
    body['Province'] = request.province;
  }
  if (!Util.isUnset(request.remark)) {
    body['Remark'] = request.remark;
  }
  if (!Util.isUnset(request.securityDomainListShrink)) {
    body['SecurityDomainList'] = request.securityDomainListShrink;
  }
  if (!Util.isUnset(request.spaceAbbreviation)) {
    body['SpaceAbbreviation'] = request.spaceAbbreviation;
  }
  if (!Util.isUnset(request.spaceType)) {
    body['SpaceType'] = request.spaceType;
  }
  if (!Util.isUnset(request.targetUid)) {
    body['TargetUid'] = request.targetUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdatePhysicalSpace',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updatePhysicalSpace(request: UpdatePhysicalSpaceRequest): UpdatePhysicalSpaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updatePhysicalSpaceWithOptions(request, runtime);
}

model UpdateProjectProgressRequest {
  instanceId?: string(name='InstanceId'),
  progress?: string(name='Progress', example='BUILD、PLAN、CANCEL、FINISH、ROLLBACK'),
  setupProjectId?: string(name='SetupProjectId', example='xxxyyy'),
}

model UpdateProjectProgressResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateProjectProgressResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateProjectProgressResponseBody(name='body'),
}

async function updateProjectProgressWithOptions(request: UpdateProjectProgressRequest, runtime: Util.RuntimeOptions): UpdateProjectProgressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.progress)) {
    body['Progress'] = request.progress;
  }
  if (!Util.isUnset(request.setupProjectId)) {
    body['SetupProjectId'] = request.setupProjectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateProjectProgress',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateProjectProgress(request: UpdateProjectProgressRequest): UpdateProjectProgressResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateProjectProgressWithOptions(request, runtime);
}

model UpdateResourceInformationRequest {
  information?: [ 
    {
      key?: string(name='Key', description='键', example='IP'),
      keyAction?: string(name='KeyAction', description='键动作', example='/xxx/zzz'),
      keyAttribute?: string(name='KeyAttribute', description='键属性', example='IP地址'),
      keyDescription?: string(name='KeyDescription', description='键描述', example='Ip地址'),
      setupProjectId?: string(name='SetupProjectId', description='建设项目id', example='adaieaoweif_s3834'),
    }
  ](name='Information', description='信息'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  resourceAttribute?: string(name='ResourceAttribute', description='资源属性', example='6510'),
  resourceInformationId?: string(name='ResourceInformationId', example='resourceInformationId'),
  resourceType?: string(name='ResourceType', description='资源类型', example='CMDB'),
}

model UpdateResourceInformationShrinkRequest {
  informationShrink?: string(name='Information', description='信息'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  resourceAttribute?: string(name='ResourceAttribute', description='资源属性', example='6510'),
  resourceInformationId?: string(name='ResourceInformationId', example='resourceInformationId'),
  resourceType?: string(name='ResourceType', description='资源类型', example='CMDB'),
}

model UpdateResourceInformationResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
}

model UpdateResourceInformationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateResourceInformationResponseBody(name='body'),
}

async function updateResourceInformationWithOptions(tmpReq: UpdateResourceInformationRequest, runtime: Util.RuntimeOptions): UpdateResourceInformationResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateResourceInformationShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.information)) {
    request.informationShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.information, 'Information', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.informationShrink)) {
    body['Information'] = request.informationShrink;
  }
  if (!Util.isUnset(request.resourceAttribute)) {
    body['ResourceAttribute'] = request.resourceAttribute;
  }
  if (!Util.isUnset(request.resourceInformationId)) {
    body['ResourceInformationId'] = request.resourceInformationId;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateResourceInformation',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateResourceInformation(request: UpdateResourceInformationRequest): UpdateResourceInformationResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateResourceInformationWithOptions(request, runtime);
}

model UpdateResourceInstanceRequest {
  instanceId?: string(name='InstanceId'),
  resourceInformation?: [ 
    {
      key?: string(name='Key', example='ip'),
      value?: string(name='Value', example='192.168.1.1'),
    }
  ](name='ResourceInformation'),
  resourceInformationId?: string(name='ResourceInformationId'),
  setupProjectId?: string(name='SetupProjectId', example='adaieaoweif_s3834'),
}

model UpdateResourceInstanceShrinkRequest {
  instanceId?: string(name='InstanceId'),
  resourceInformationShrink?: string(name='ResourceInformation'),
  resourceInformationId?: string(name='ResourceInformationId'),
  setupProjectId?: string(name='SetupProjectId', example='adaieaoweif_s3834'),
}

model UpdateResourceInstanceResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateResourceInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateResourceInstanceResponseBody(name='body'),
}

async function updateResourceInstanceWithOptions(tmpReq: UpdateResourceInstanceRequest, runtime: Util.RuntimeOptions): UpdateResourceInstanceResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateResourceInstanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.resourceInformation)) {
    request.resourceInformationShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.resourceInformation, 'ResourceInformation', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.resourceInformationShrink)) {
    query['ResourceInformation'] = request.resourceInformationShrink;
  }
  if (!Util.isUnset(request.resourceInformationId)) {
    query['ResourceInformationId'] = request.resourceInformationId;
  }
  if (!Util.isUnset(request.setupProjectId)) {
    query['SetupProjectId'] = request.setupProjectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateResourceInstance',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateResourceInstance(request: UpdateResourceInstanceRequest): UpdateResourceInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateResourceInstanceWithOptions(request, runtime);
}

model UpdateSetupProjectRequest {
  architectureId?: string(name='ArchitectureId', description='架构id', example='archIdxxxyyy'),
  deliveryTime?: string(name='DeliveryTime', description='预计交付时间', example='2021-03-27 00:00:00'),
  description?: string(name='Description', description='描述', example='建设交付项目'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  nodes?: string(name='Nodes', description='节点', example='[]'),
  packages?: [ 
    {
      deviceNumber?: long(name='DeviceNumber', description='设备号', example='1'),
      model?: string(name='Model', description='型号', example='6510'),
      role?: string(name='Role', description='角色', example='DSW'),
      vendor?: string(name='Vendor', description='厂商', example='Ruijie'),
    }
  ](name='Packages', description='套餐'),
  setupProjectId?: string(name='SetupProjectId', description='代表资源一级ID的资源属性字段', example='setupProjectIdxxxyyy'),
  spaceId?: string(name='SpaceId', description='物理空间uId', example='spaceIdxxxyyy'),
}

model UpdateSetupProjectShrinkRequest {
  architectureId?: string(name='ArchitectureId', description='架构id', example='archIdxxxyyy'),
  deliveryTime?: string(name='DeliveryTime', description='预计交付时间', example='2021-03-27 00:00:00'),
  description?: string(name='Description', description='描述', example='建设交付项目'),
  instanceId?: string(name='InstanceId', example='instanceId'),
  nodes?: string(name='Nodes', description='节点', example='[]'),
  packagesShrink?: string(name='Packages', description='套餐'),
  setupProjectId?: string(name='SetupProjectId', description='代表资源一级ID的资源属性字段', example='setupProjectIdxxxyyy'),
  spaceId?: string(name='SpaceId', description='物理空间uId', example='spaceIdxxxyyy'),
}

model UpdateSetupProjectResponseBody = {
  requestId?: string(name='RequestId'),
  setupProjectId?: string(name='SetupProjectId'),
  setupProjectName?: string(name='SetupProjectName'),
  setupProjectSpecification?: string(name='SetupProjectSpecification'),
}

model UpdateSetupProjectResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateSetupProjectResponseBody(name='body'),
}

async function updateSetupProjectWithOptions(tmpReq: UpdateSetupProjectRequest, runtime: Util.RuntimeOptions): UpdateSetupProjectResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateSetupProjectShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.packages)) {
    request.packagesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.packages, 'Packages', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.architectureId)) {
    body['ArchitectureId'] = request.architectureId;
  }
  if (!Util.isUnset(request.deliveryTime)) {
    body['DeliveryTime'] = request.deliveryTime;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.nodes)) {
    body['Nodes'] = request.nodes;
  }
  if (!Util.isUnset(request.packagesShrink)) {
    body['Packages'] = request.packagesShrink;
  }
  if (!Util.isUnset(request.setupProjectId)) {
    body['SetupProjectId'] = request.setupProjectId;
  }
  if (!Util.isUnset(request.spaceId)) {
    body['SpaceId'] = request.spaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateSetupProject',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateSetupProject(request: UpdateSetupProjectRequest): UpdateSetupProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateSetupProjectWithOptions(request, runtime);
}

model UpdateSpaceModelRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  sort?: [ 
    {
      level?: long(name='Level', example='1'),
      levelName?: string(name='LevelName', example='园区'),
    }
  ](name='Sort', description='层级'),
  spaceModelId?: string(name='SpaceModelId', example='spaceModelIdxxxyyy'),
  spaceType?: string(name='SpaceType', example='园区'),
}

model UpdateSpaceModelShrinkRequest {
  instanceId?: string(name='InstanceId', example='instanceId'),
  sortShrink?: string(name='Sort', description='层级'),
  spaceModelId?: string(name='SpaceModelId', example='spaceModelIdxxxyyy'),
  spaceType?: string(name='SpaceType', example='园区'),
}

model UpdateSpaceModelResponseBody = {
  requestId?: string(name='RequestId', example='requestId'),
}

model UpdateSpaceModelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateSpaceModelResponseBody(name='body'),
}

async function updateSpaceModelWithOptions(tmpReq: UpdateSpaceModelRequest, runtime: Util.RuntimeOptions): UpdateSpaceModelResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateSpaceModelShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.sortShrink)) {
    body['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.spaceModelId)) {
    body['SpaceModelId'] = request.spaceModelId;
  }
  if (!Util.isUnset(request.spaceType)) {
    body['SpaceType'] = request.spaceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateSpaceModel',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateSpaceModel(request: UpdateSpaceModelRequest): UpdateSpaceModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateSpaceModelWithOptions(request, runtime);
}

model UpdateSpaceModelInstanceRequest {
  instance?: string(name='Instance', example='{}'),
  spaceId?: string(name='SpaceId', example='spaceIdxxxyyy'),
}

model UpdateSpaceModelInstanceResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateSpaceModelInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateSpaceModelInstanceResponseBody(name='body'),
}

async function updateSpaceModelInstanceWithOptions(request: UpdateSpaceModelInstanceRequest, runtime: Util.RuntimeOptions): UpdateSpaceModelInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.instance)) {
    query['Instance'] = request.instance;
  }
  if (!Util.isUnset(request.spaceId)) {
    query['SpaceId'] = request.spaceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateSpaceModelInstance',
    version = '2020-08-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateSpaceModelInstance(request: UpdateSpaceModelInstanceRequest): UpdateSpaceModelInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateSpaceModelInstanceWithOptions(request, runtime);
}

